Skip to content

Instantly share code, notes, and snippets.

@connyay
Created October 14, 2014 23:17
Show Gist options
  • Save connyay/d75d31c6fce3239e37e1 to your computer and use it in GitHub Desktop.
Save connyay/d75d31c6fce3239e37e1 to your computer and use it in GitHub Desktop.
'use strict';
var tracer = require('tracer');
var daily = tracer.dailyfile({
format: '{{message}}',
root: './logs'
});
var color = tracer.colorConsole({
format: '{{message}}'
});
var levels = ['log', 'trace', 'debug', 'info', 'warn', 'error'];
module.exports = tracer.console({
transport: function(data) {
var level = levels[data.level];
color[level](data.output);
daily[level](data.output);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment