mirror of https://github.com/status-im/codimd.git
Merge pull request #1059 from SISheogorath/fix/winstonStreaming
Fix streaming for winston
This commit is contained in:
commit
7328e7ad79
2
app.js
2
app.js
|
@ -53,7 +53,7 @@ if (config.useSSL) {
|
|||
|
||||
// logger
|
||||
app.use(morgan('combined', {
|
||||
'stream': logger
|
||||
'stream': logger.stream
|
||||
}))
|
||||
|
||||
// socket io
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue