Skip to content

Commit

Permalink
chore(logs): add job name in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
onyxvd committed Jun 26, 2024
1 parent 6591120 commit ae1ca75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/config/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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({
Expand Down

0 comments on commit ae1ca75

Please sign in to comment.