2017-07-11 16:55:03 -07:00
|
|
|
module.exports = (winston, logLevel) => {
|
2017-06-19 19:34:34 -07:00
|
|
|
winston.configure({
|
|
|
|
transports: [
|
2017-06-19 19:46:39 -07:00
|
|
|
new (winston.transports.Console)({
|
2017-06-20 16:36:19 -07:00
|
|
|
level : logLevel,
|
|
|
|
timestamp : false,
|
|
|
|
colorize : true,
|
|
|
|
prettyPrint : true,
|
|
|
|
handleExceptions : true,
|
|
|
|
humanReadableUnhandledException: true,
|
2017-06-19 19:34:34 -07:00
|
|
|
}),
|
2017-06-19 19:46:39 -07:00
|
|
|
],
|
2017-06-19 19:34:34 -07:00
|
|
|
});
|
2017-06-19 13:10:06 -07:00
|
|
|
|
|
|
|
winston.error('Level 0');
|
|
|
|
winston.warn('Level 1');
|
|
|
|
winston.info('Level 2');
|
|
|
|
winston.verbose('Level 3');
|
|
|
|
winston.debug('Level 4');
|
|
|
|
winston.silly('Level 5');
|
|
|
|
};
|