mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-17 03:22:14 +00:00
add timestamps to logs
This commit is contained in:
parent
39a9753fd6
commit
4deb5ada2f
1 changed files with 2 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ const logger = new winston.Logger();
|
|||
if (IS_PROD) {
|
||||
if (ENABLE_LOGS_IN_PROD) {
|
||||
logger.add(winston.transports.Console, {
|
||||
timestamp: true,
|
||||
colorize: false,
|
||||
prettyPrint: false,
|
||||
});
|
||||
|
|
@ -23,6 +24,7 @@ if (IS_PROD) {
|
|||
} else if (!IS_TEST || IS_TEST && ENABLE_LOGS_IN_TEST) { // Do not log anything when testing unless specified
|
||||
logger
|
||||
.add(winston.transports.Console, {
|
||||
timestamp: true,
|
||||
colorize: true,
|
||||
prettyPrint: true,
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue