From ae1ca7590cd714ad6059d4eb733e12a8a480390d Mon Sep 17 00:00:00 2001 From: Daniel Petrov Date: Wed, 26 Jun 2024 16:46:20 +0300 Subject: [PATCH] chore(logs): add job name in logs --- server/config/logger.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/config/logger.js b/server/config/logger.js index d43e2036d..a512cee4a 100644 --- a/server/config/logger.js +++ b/server/config/logger.js @@ -11,7 +11,7 @@ const buildConsoleLogger = api => { winston.format.timestamp(), winston.format.colorize(), winston.format.printf(info => { - return `${api.id} @ ${info.timestamp} - ${info.level}: ${info.message}` + return `${api.id} @ ${info.timestamp} - ${info.level}:${info.class ? ' [' + info.class + ']' : ''} ${info.message}` }) ), levels: winston.config.syslog.levels, @@ -37,7 +37,7 @@ const buildFileLogger = api => { winston.format.splat(), winston.format.timestamp(), winston.format.printf(info => { - return `${api.id} @ ${info.timestamp} - ${info.level}: ${info.message}` + return `${api.id} @ ${info.timestamp} - ${info.level}:${info.class ? ' [' + info.class + ']' : ''} ${info.message}` })), transports: [ new winston.transports.File({