backend: Simplify LoggerService configuration by consolidating transport setup
This commit is contained in:
parent
89b8b699ee
commit
f2a7e80d76
@ -19,11 +19,8 @@ export class LoggerService {
|
|||||||
winston.format.errors({ stack: true })
|
winston.format.errors({ stack: true })
|
||||||
// winston.format.splat(),
|
// winston.format.splat(),
|
||||||
// winston.format.json()
|
// winston.format.json()
|
||||||
)
|
),
|
||||||
});
|
transports: [
|
||||||
|
|
||||||
if (process.env.NODE_ENV !== 'production') {
|
|
||||||
this.logger.add(
|
|
||||||
new winston.transports.Console({
|
new winston.transports.Console({
|
||||||
format: winston.format.combine(
|
format: winston.format.combine(
|
||||||
winston.format.colorize(),
|
winston.format.colorize(),
|
||||||
@ -32,8 +29,8 @@ export class LoggerService {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
);
|
]
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generic method to log messages with a specific level
|
// Generic method to log messages with a specific level
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user