import { join } from 'path'
import { createInterface } from 'readline'
import * as winston from 'winston'
-import { readFileBufferPromise } from '../server/helpers/core-utils'
import { CONFIG } from '../server/initializers/constants'
const label = CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.WEBSERVER.PORT
humanReadableUnhandledException: true,
json: false,
colorize: true,
- prettyPrint: true
+ prettyPrint: true,
+ stderrLevels: []
})
],
exitOnError: true
rl.on('line', line => {
const log = JSON.parse(line)
- logLevels[log.level](log.message, log.stack)
+ const additionalInfo: any = {}
+
+ Object.keys(log).forEach(logKey => {
+ if (logKey !== 'message' && logKey !== 'level') additionalInfo[logKey] = log[logKey]
+ })
+
+ logLevels[log.level](log.message, additionalInfo)
})