aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/logger.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-26 17:52:14 +0200
committerChocobozzz <me@florianbigard.com>2018-06-26 18:05:47 +0200
commit85b4d9c52eb8a6b3b54152cca5c6edde481c863c (patch)
treeeec0fbda814f955df1f163922c7d0ba3f7b43441 /server/helpers/logger.ts
parent9b67da3d9bc951c624f17dce7821036f8518d893 (diff)
downloadPeerTube-85b4d9c52eb8a6b3b54152cca5c6edde481c863c.tar.gz
PeerTube-85b4d9c52eb8a6b3b54152cca5c6edde481c863c.tar.zst
PeerTube-85b4d9c52eb8a6b3b54152cca5c6edde481c863c.zip
Upgrade dependencies
Diffstat (limited to 'server/helpers/logger.ts')
-rw-r--r--server/helpers/logger.ts8
1 files changed, 1 insertions, 7 deletions
diff --git a/server/helpers/logger.ts b/server/helpers/logger.ts
index d92381a2c..04ddf01a6 100644
--- a/server/helpers/logger.ts
+++ b/server/helpers/logger.ts
@@ -30,7 +30,6 @@ const consoleLoggerFormat = winston.format.printf(info => {
30 if (additionalInfos === '{}') additionalInfos = '' 30 if (additionalInfos === '{}') additionalInfos = ''
31 else additionalInfos = ' ' + additionalInfos 31 else additionalInfos = ' ' + additionalInfos
32 32
33 if (info.message && info.message.stack !== undefined) info.message = info.message.stack
34 return `[${info.label}] ${info.timestamp} ${info.level}: ${info.message}${additionalInfos}` 33 return `[${info.label}] ${info.timestamp} ${info.level}: ${info.message}${additionalInfos}`
35}) 34})
36 35
@@ -39,10 +38,6 @@ const jsonLoggerFormat = winston.format.printf(infoArg => {
39 ? Object.assign({}, infoArg, { err: infoArg.err.stack }) 38 ? Object.assign({}, infoArg, { err: infoArg.err.stack })
40 : infoArg 39 : infoArg
41 40
42 if (infoArg.message && infoArg.message.stack !== undefined) {
43 info = Object.assign({}, info, { message: infoArg.message.stack })
44 }
45
46 return JSON.stringify(info) 41 return JSON.stringify(info)
47}) 42})
48 43
@@ -53,7 +48,7 @@ const labelFormatter = winston.format.label({
53 label 48 label
54}) 49})
55 50
56const logger = new winston.createLogger({ 51const logger = winston.createLogger({
57 level: CONFIG.LOG.LEVEL, 52 level: CONFIG.LOG.LEVEL,
58 transports: [ 53 transports: [
59 new winston.transports.File({ 54 new winston.transports.File({
@@ -70,7 +65,6 @@ const logger = new winston.createLogger({
70 }), 65 }),
71 new winston.transports.Console({ 66 new winston.transports.Console({
72 handleExceptions: true, 67 handleExceptions: true,
73 humanReadableUnhandledException: true,
74 format: winston.format.combine( 68 format: winston.format.combine(
75 timestampFormatter, 69 timestampFormatter,
76 winston.format.splat(), 70 winston.format.splat(),