From 1e9d7b60cd93ad5d1aed47fd157f1993d4b4eac0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 9 Feb 2018 13:15:40 +0100 Subject: Fix crash with websocket tracker --- server/helpers/logger.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server') diff --git a/server/helpers/logger.ts b/server/helpers/logger.ts index 7624b3cff..201ea2235 100644 --- a/server/helpers/logger.ts +++ b/server/helpers/logger.ts @@ -26,12 +26,12 @@ const loggerFormat = winston.format.printf((info) => { if (additionalInfos === '{}') additionalInfos = '' else additionalInfos = ' ' + additionalInfos - if (info.message.stack !== undefined) info.message = info.message.stack + if (info.message && info.message.stack !== undefined) info.message = info.message.stack return `[${info.label}] ${info.timestamp} ${info.level}: ${info.message}${additionalInfos}` }) const timestampFormatter = winston.format.timestamp({ - format: 'YYYY-MM-DD hh:mm:ss.SSS' + format: 'YYYY-MM-dd HH:mm:ss.SSS' }) const labelFormatter = winston.format.label({ label -- cgit v1.2.3