cimico
v0.0.4
Published
Another logging library
Maintainers
Readme
Cimico
Work in progress
Just another logger, based on DEBUG, with call site details and pretty printing.

DEBUG
Uses the DEBUG env variable to figure out whether to log or not.
Create a logger using (see Flags for options)
const logger = cimico('app:parser', {
format: false,
color: true,
pretty: true,
timestamp: false,
filename: true,
});If the DEBUG variable is set to *, app:*, app:parser or app:parser:*, then the logs will appear
Methods
The methods available to logger are with their shorthands
log/l(stdout)success/s(stdout)debug/d(stdout)error/e(stderr)
Flags
Chance the way the method work by using,
format/f, allows the use of format string, see belowcolor/c, turns color onpretty/p, prints errors and objects in a pretty waytimestamp/ts, adds timestamp to header labelfilename/fn, add filename to header label
Formatting
When formatting flag is used or format is true in options, the a format string can be used to render the data.
dfor dimbfor boldufor underline(name)for key value pair
Eg,
logger.format.log('This is bold=%b or %b(bold)', 'one', 'two');