Created
November 23, 2013 23:39
-
-
Save pasupulaphani/7621428 to your computer and use it in GitHub Desktop.
basic usage of winston logger.
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
var winston = require('winston'); | |
var logger = new (winston.Logger)({ | |
transports: [ | |
new (winston.transports.Console)({ json: false, timestamp: true }), | |
new winston.transports.File({ filename: __dirname + '/debug.log', json: false }) | |
], | |
exceptionHandlers: [ | |
new (winston.transports.Console)({ json: false, timestamp: true }), | |
new winston.transports.File({ filename: __dirname + '/uncaught_exceptions.log', json: false }) | |
], | |
exitOnError: false | |
}); | |
module.exports = logger; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment