Skip to content

Commit e2831f6

Browse files
committed
winston: Add workaround for winstonjs/winston#1338
format.errors({ stack: true }) doesn't seem to work when using a different formatter per transport (winstonjs/winston#1338 (comment))
1 parent 5231966 commit e2831f6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

winston/app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ const logger = createLogger({
2020
level: 'debug',
2121
// https://github.com/winstonjs/winston-syslog#log-levels
2222
levels: config.syslog.levels,
23+
// This allows the custom format for each transport to contain the stack trace (https://github.com/winstonjs/winston/issues/1338#issuecomment-697958085)
24+
format: format.errors({ stack: true }),
2325
transports: [
2426
new transports.Console({
2527
format: combine(

0 commit comments

Comments
 (0)