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