aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-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(),