Created
July 29, 2019 18:48
-
-
Save thomasstep/050639462290894dcfcaf8c3f117b201 to your computer and use it in GitHub Desktop.
Winston configuration
This file contains hidden or 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'); | |
// In other files use var winston = require('./config/winston') and place this file in the app's config/ directory | |
var options = { | |
console: { | |
level: 'info', | |
handleExceptions: true, | |
json: true, | |
colorize: true, | |
}, | |
}; | |
var logger = new winston.Logger({ | |
transports: [ | |
new winston.transports.Console(options.console) | |
], | |
exitOnError: false, // do not exit on handled exceptions | |
}); | |
module.exports = logger; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment