Created
August 24, 2016 02:14
-
-
Save tywong/c9bfb62430260705bf2435b362dd46dc 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
let LOG_FILE = parseInt((new Date()).getTime() / 1000); | |
let winston = require('winston'); | |
winston.remove(winston.transports.Console); | |
winston.add(winston.transports.File, { | |
"name": "debug-log", | |
"json": false, | |
"filename": `log/${LOG_FILE}-debug.log`, | |
"level": "debug" | |
}); | |
winston.add(winston.transports.File, { | |
"name": "info-log", | |
"json": false, | |
"filename": `log/${LOG_FILE}-info.log`, | |
"level": "info" | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment