2017-03-08 10:45:51 +00:00
|
|
|
var winston = require('winston')
|
|
|
|
winston.emitErrs = true
|
2015-06-01 10:04:25 +00:00
|
|
|
|
|
|
|
var logger = new winston.Logger({
|
2017-03-08 10:45:51 +00:00
|
|
|
transports: [
|
|
|
|
new winston.transports.Console({
|
|
|
|
level: 'debug',
|
|
|
|
handleExceptions: true,
|
|
|
|
json: false,
|
|
|
|
colorize: true,
|
|
|
|
timestamp: true
|
|
|
|
})
|
|
|
|
],
|
|
|
|
exitOnError: false
|
|
|
|
})
|
2015-06-01 10:04:25 +00:00
|
|
|
|
2017-03-08 10:45:51 +00:00
|
|
|
module.exports = logger
|
2015-06-01 10:04:25 +00:00
|
|
|
module.exports.stream = {
|
2017-03-08 10:45:51 +00:00
|
|
|
write: function (message, encoding) {
|
|
|
|
logger.info(message)
|
|
|
|
}
|
|
|
|
}
|