2016-09-29 01:58:18 +00:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
var winston = require('winston');
|
|
|
|
|
|
|
|
module.exports = (isDebug) => {
|
|
|
|
|
2016-10-17 23:52:04 +00:00
|
|
|
winston.remove(winston.transports.Console);
|
2016-09-29 01:58:18 +00:00
|
|
|
winston.add(winston.transports.Console, {
|
2016-10-30 22:41:10 +00:00
|
|
|
level: (isDebug) ? 'debug' : 'info',
|
2016-09-29 01:58:18 +00:00
|
|
|
prettyPrint: true,
|
|
|
|
colorize: true,
|
|
|
|
silent: false,
|
|
|
|
timestamp: true
|
|
|
|
});
|
|
|
|
|
|
|
|
return winston;
|
|
|
|
|
|
|
|
};
|