diff options
-rwxr-xr-x | scripts/parse-log.ts | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/scripts/parse-log.ts b/scripts/parse-log.ts index 410da3c61..eb3534e5e 100755 --- a/scripts/parse-log.ts +++ b/scripts/parse-log.ts | |||
@@ -75,11 +75,16 @@ function run () { | |||
75 | }) | 75 | }) |
76 | 76 | ||
77 | rl.on('line', line => { | 77 | rl.on('line', line => { |
78 | const log = JSON.parse(line) | 78 | try { |
79 | // Don't know why but loggerFormat does not remove splat key | 79 | const log = JSON.parse(line) |
80 | Object.assign(log, { splat: undefined }) | 80 | // Don't know why but loggerFormat does not remove splat key |
81 | 81 | Object.assign(log, { splat: undefined }) | |
82 | logLevels[log.level](log) | 82 | |
83 | logLevels[log.level](log) | ||
84 | } catch (err) { | ||
85 | console.error('Cannot parse line.', line) | ||
86 | throw err | ||
87 | } | ||
83 | }) | 88 | }) |
84 | 89 | ||
85 | stream.once('close', () => res()) | 90 | stream.once('close', () => res()) |