mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-30 04:00:00 -05:00
Merge pull request #1059 from SISheogorath/fix/winstonStreaming
Fix streaming for winston
This commit is contained in:
commit
7328e7ad79
2 changed files with 10 additions and 2 deletions
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 a new issue