diff options
Diffstat (limited to '')
-rw-r--r-- | app.js | 2 | ||||
-rw-r--r-- | lib/logger.js | 10 |
2 files changed, 10 insertions, 2 deletions
@@ -53,7 +53,7 @@ if (config.useSSL) { // logger app.use(morgan('combined', { - 'stream': logger + 'stream': logger.stream })) // socket io diff --git a/lib/logger.js b/lib/logger.js index c70b81b8..5ef1860a 100644 --- a/lib/logger.js +++ b/lib/logger.js @@ -1,7 +1,7 @@ 'use strict' const {createLogger, format, transports} = require('winston') -module.exports = createLogger({ +const logger = createLogger({ level: 'debug', format: format.combine( format.uncolorize(), @@ -17,3 +17,11 @@ module.exports = createLogger({ ], exitOnError: false }) + +logger.stream = { + write: function (message, encoding) { + logger.info(message) + } +} + +module.exports = logger |