aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-02-09 13:15:40 +0100
committerChocobozzz <me@florianbigard.com>2018-02-09 13:15:40 +0100
commit1e9d7b60cd93ad5d1aed47fd157f1993d4b4eac0 (patch)
tree4b15a32c622877c93ca334f43be678856f99c14e /server/helpers
parent53ac1448f073a5db69f934550404c6997822501e (diff)
downloadPeerTube-1e9d7b60cd93ad5d1aed47fd157f1993d4b4eac0.tar.gz
PeerTube-1e9d7b60cd93ad5d1aed47fd157f1993d4b4eac0.tar.zst
PeerTube-1e9d7b60cd93ad5d1aed47fd157f1993d4b4eac0.zip
Fix crash with websocket tracker
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/logger.ts4
1 files changed, 2 insertions, 2 deletions
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) => {
26 if (additionalInfos === '{}') additionalInfos = '' 26 if (additionalInfos === '{}') additionalInfos = ''
27 else additionalInfos = ' ' + additionalInfos 27 else additionalInfos = ' ' + additionalInfos
28 28
29 if (info.message.stack !== undefined) info.message = info.message.stack 29 if (info.message && info.message.stack !== undefined) info.message = info.message.stack
30 return `[${info.label}] ${info.timestamp} ${info.level}: ${info.message}${additionalInfos}` 30 return `[${info.label}] ${info.timestamp} ${info.level}: ${info.message}${additionalInfos}`
31}) 31})
32 32
33const timestampFormatter = winston.format.timestamp({ 33const timestampFormatter = winston.format.timestamp({
34 format: 'YYYY-MM-DD hh:mm:ss.SSS' 34 format: 'YYYY-MM-dd HH:mm:ss.SSS'
35}) 35})
36const labelFormatter = winston.format.label({ 36const labelFormatter = winston.format.label({
37 label 37 label