Ledger is an event based NodeJS module used for logging events to stdout, files or MongoDB.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
var ledger = require('../')();
|
|
|
|
|
|
|
|
|
ledger.on('log::error', function(time, msg){
|
|
|
//do somethign special with errors
|
|
|
});
|
|
|
|
|
|
ledger.on('log::*', function(time, msg){
|
|
|
//catchall for any logs
|
|
|
});
|
|
|
|
|
|
|
|
|
console.log('log');
|
|
|
console.info('info');
|
|
|
console.warn('warn');
|
|
|
console.error('error');
|