Created
October 14, 2014 23:17
-
-
Save connyay/d75d31c6fce3239e37e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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