tick-log

1.1.4 • Public • Published

This is an ultra-lightweight, pure javascript library which gives colored log data for both node and browser.

If output is not TTY colors are suppressed so that the logs can still be human readable.

Installation

yarn add tick-log

Usage

const tickLog = require('tick-log');
tickLog.start('This is the START log message');
tickLog.info('This is the INFO log message');
tickLog.success('This is the SUCCESS log message');
tickLog.error('This is the ERROR log message');

API

Name Description
start Uses yellow label when the output is TTY
info Uses blue label when the output is TTY
success Uses green label when the output is TTY
error Uses red background label when the output is TTY
forceColor When the output is not TTY, pass true to still use the coloring. (For browsers coloring still will not apply.)

Common paraters

Name Description
text The text to be printed
useProcessStdoutWrite In some cases console.log output is badly formatted (like using console.log within jest).

For such cases you can ask to use process.stdout.write.

If process.stdout does not exist this flag is ignored. (Defaults to false)

License

The license is MIT and full text here.

Used Modules

None

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i tick-log

      Weekly Downloads

      2

      Version

      1.1.4

      License

      MIT

      Unpacked Size

      10 kB

      Total Files

      9

      Last publish

      Collaborators

      • mehmet.kaplan