mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
add timestamps to logs
This commit is contained in:
@@ -16,6 +16,7 @@ const logger = new winston.Logger();
|
|||||||
if (IS_PROD) {
|
if (IS_PROD) {
|
||||||
if (ENABLE_LOGS_IN_PROD) {
|
if (ENABLE_LOGS_IN_PROD) {
|
||||||
logger.add(winston.transports.Console, {
|
logger.add(winston.transports.Console, {
|
||||||
|
timestamp: true,
|
||||||
colorize: false,
|
colorize: false,
|
||||||
prettyPrint: 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
|
} else if (!IS_TEST || IS_TEST && ENABLE_LOGS_IN_TEST) { // Do not log anything when testing unless specified
|
||||||
logger
|
logger
|
||||||
.add(winston.transports.Console, {
|
.add(winston.transports.Console, {
|
||||||
|
timestamp: true,
|
||||||
colorize: true,
|
colorize: true,
|
||||||
prettyPrint: true,
|
prettyPrint: true,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user