custom-logger
Version:
Simple yet highly customizable console logger for node.js. Supports templating output, custom log levels, custom log types, and colored output.
18 lines (10 loc) • 353 B
JavaScript
var log = require('./logger').config({ level: 0 });
log.debug('hello?');
log.info('hello world!');
log.warn('careful there, world');
log.error('WHOA WHOA WHOA world!');
log.info("I see", "3", "bananas!") // Outputs "I see 3 bananas!"
log.config({
messageFormatting: true
});
log.info("I see %d %s!", 3, "bananas"); // Outputs "I see 3 bananas!"