console-ten
Version:
Console-Ten is a simple console logging extension for node.js, it adds Timestamps and log type to the output.
9 lines (7 loc) • 341 B
JavaScript
var consoleTEN = require('../');
consoleTEN.init(console, consoleTEN.LEVELS.ALL, function(levelName){
return "[" + (new Date().toString()) + "] [" + levelName.toLowerCase() + "] - ";
});
console.error('Testing custom log format function.');
console.warn('You should be able to specify this function however you like');