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