diff options
Diffstat (limited to '')
-rw-r--r-- | lib/logger.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/logger.js b/lib/logger.js index 2111d69a..f8b3895c 100644 --- a/lib/logger.js +++ b/lib/logger.js @@ -1,23 +1,23 @@ 'use strict' -var winston = require('winston') -winston.emitErrs = true +const winston = require('winston') -var logger = new winston.Logger({ +class Logger extends winston.Logger { + // Implement stream.writable.write interface + write (chunk) { + this.info(chunk) + } +} + +module.exports = new Logger({ transports: [ new winston.transports.Console({ level: 'debug', handleExceptions: true, json: false, - colorize: true, + colorize: false, timestamp: true }) ], + emitErrs: true, exitOnError: false }) - -module.exports = logger -module.exports.stream = { - write: function (message, encoding) { - logger.info(message) - } -} |