spee.ch/config/loggerConfig.js
2017-09-13 15:41:52 -07:00

25 lines
714 B
JavaScript

module.exports = (winston, logLevel) => {
winston.configure({
transports: [
new (winston.transports.Console)({
level : logLevel,
timestamp : false,
colorize : true,
prettyPrint : true,
handleExceptions : true,
humanReadableUnhandledException: true,
}),
],
});
// winston.on('error', (err) => {
// console.log('unhandled exception in winston >> ', err);
// });
winston.error('Level 0');
winston.warn('Level 1');
winston.info('Level 2');
winston.verbose('Level 3');
winston.debug('Level 4');
winston.silly('Level 5');
};