logzoo
Simple logger zoo.
It generates different loggers that all use console.log()
to output messages,
however each logger corresponds to some named part of your application (e.g.
'HTTP', 'Storage', 'Model') and have the same set of levels (e.g 'error', 'warn',
'info', 'debug').
Trivial usage example
const log = ; // by default log has .error(), .warn(), .info(), and .debug() methodslog;// same as console.log('[error] an error message (%d)', 123);
Example
// this is app.jsconst logzoo = 'CORE, HTTP, STORAGE, Model' // these are default levels, right now the list is ignored! 'error, warn, info, debug'; logzoo; // no info and debug const log = logzoo; log; // skipped since log levellog; // console.log('CORE [warn] Some useless warning');
// this is http.jsconst log = ; log;// console.log('HTTP [error] connection is not established');