clix-logger
Another console log wrapper with colored support and icons
Install
npm i -g clix-logger
Usage
var options = // Will print the messages using chalk colors. default is false coloredOutput: false // Will suppress the output of `subtle` and `log` methods // all of the others will still be printed quiet: false // default is false,;var logger = options;logger;
methods
ok(arg1[, arg2, ...argn] )
subtle(arg1[, arg2, ...argn] )
log(arg1[, arg2, ...argn] )
success(arg1[, arg2, ...argn] )
error(arg1[, arg2, ...argn] )
print(arg1[, arg2, ...argn] )
NOTES:
- All the methods above use
console.log
to print the messages, except theerror
one, which usesconsole.error
. subtle
andlog
are suppressed whenoptions.quiet
is specified.print
does not have an icon at the beginning of the line
Example
the following code
var logger = coloredOutput: true ; # will use yellow colorlogger; # will use white colorlogger; # will use white colorlogger; # will use red colorlogger; # will use gray colorlogger; # will use green colorlogger;
Will produce this output: