diff options
author | Christoph (Sheogorath) Kern | 2018-11-17 11:36:56 +0100 |
---|---|---|
committer | GitHub | 2018-11-17 11:36:56 +0100 |
commit | 7328e7ad79be86dfb7494ae7946d77f25c8eaf59 (patch) | |
tree | 859acc8024d08bc7c63c7f2a2d22f3109038700a /lib | |
parent | f1367ba2702100a420477151d90e6a0b1999ffb3 (diff) | |
parent | bdeb05339764d1db64f45c56860d33929b6776e9 (diff) |
Merge pull request #1059 from SISheogorath/fix/winstonStreaming
Fix streaming for winston
Diffstat (limited to '')
-rw-r--r-- | lib/logger.js | 10 |
1 files changed, 9 insertions, 1 deletions
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 |