Clearer error in parse log
This commit is contained in:
parent
3f6441e09a
commit
2b6c55528d
|
@ -75,11 +75,16 @@ function run () {
|
||||||
})
|
})
|
||||||
|
|
||||||
rl.on('line', line => {
|
rl.on('line', line => {
|
||||||
const log = JSON.parse(line)
|
try {
|
||||||
// Don't know why but loggerFormat does not remove splat key
|
const log = JSON.parse(line)
|
||||||
Object.assign(log, { splat: undefined })
|
// Don't know why but loggerFormat does not remove splat key
|
||||||
|
Object.assign(log, { splat: undefined })
|
||||||
|
|
||||||
logLevels[log.level](log)
|
logLevels[log.level](log)
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Cannot parse line.', line)
|
||||||
|
throw err
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
stream.once('close', () => res())
|
stream.once('close', () => res())
|
||||||
|
|
Loading…
Reference in New Issue