diff options
Diffstat (limited to 'server/helpers/logger.ts')
-rw-r--r-- | server/helpers/logger.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/helpers/logger.ts b/server/helpers/logger.ts index 6d369a8fb..480c5b49e 100644 --- a/server/helpers/logger.ts +++ b/server/helpers/logger.ts | |||
@@ -22,7 +22,7 @@ function loggerReplacer (key: string, value: any) { | |||
22 | } | 22 | } |
23 | 23 | ||
24 | const consoleLoggerFormat = winston.format.printf(info => { | 24 | const consoleLoggerFormat = winston.format.printf(info => { |
25 | let additionalInfos = JSON.stringify(info.meta, loggerReplacer, 2) | 25 | let additionalInfos = JSON.stringify(info.meta || info.err, loggerReplacer, 2) |
26 | if (additionalInfos === undefined || additionalInfos === '{}') additionalInfos = '' | 26 | if (additionalInfos === undefined || additionalInfos === '{}') additionalInfos = '' |
27 | else additionalInfos = ' ' + additionalInfos | 27 | else additionalInfos = ' ' + additionalInfos |
28 | 28 | ||
@@ -96,13 +96,13 @@ const bunyanLogger = { | |||
96 | error: bunyanLogFactory('error'), | 96 | error: bunyanLogFactory('error'), |
97 | fatal: bunyanLogFactory('error') | 97 | fatal: bunyanLogFactory('error') |
98 | } | 98 | } |
99 | |||
100 | // --------------------------------------------------------------------------- | 99 | // --------------------------------------------------------------------------- |
101 | 100 | ||
102 | export { | 101 | export { |
103 | timestampFormatter, | 102 | timestampFormatter, |
104 | labelFormatter, | 103 | labelFormatter, |
105 | consoleLoggerFormat, | 104 | consoleLoggerFormat, |
105 | jsonLoggerFormat, | ||
106 | logger, | 106 | logger, |
107 | bunyanLogger | 107 | bunyanLogger |
108 | } | 108 | } |