2017-03-14 05:02:43 +00:00
|
|
|
'use strict'
|
2017-03-18 17:21:43 +00:00
|
|
|
const winston = require('winston')
|
2015-06-01 10:04:25 +00:00
|
|
|
|
2017-03-18 17:21:43 +00:00
|
|
|
class Logger extends winston.Logger {
|
|
|
|
// Implement stream.writable.write interface
|
|
|
|
write (chunk) {
|
|
|
|
this.info(chunk)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = new Logger({
|
2017-03-08 10:45:51 +00:00
|
|
|
transports: [
|
|
|
|
new winston.transports.Console({
|
|
|
|
level: 'debug',
|
|
|
|
handleExceptions: true,
|
|
|
|
json: false,
|
2017-03-18 17:21:43 +00:00
|
|
|
colorize: false,
|
2017-03-08 10:45:51 +00:00
|
|
|
timestamp: true
|
|
|
|
})
|
|
|
|
],
|
2017-03-18 17:21:43 +00:00
|
|
|
emitErrs: true,
|
2017-03-08 10:45:51 +00:00
|
|
|
exitOnError: false
|
|
|
|
})
|