mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-18 09:52:20 +00:00
fix(logs): log text message in production
This commit is contained in:
parent
8300464cfc
commit
4e3481445c
1 changed files with 16 additions and 6 deletions
|
|
@ -26,12 +26,22 @@ export { _config as _loggerConfig }; // exported for use during tests
|
|||
|
||||
if (IS_PROD) {
|
||||
if (ENABLE_CONSOLE_LOGS_IN_PROD) {
|
||||
logger.add(new winston.transports.Console({
|
||||
format: winston.format.combine(
|
||||
winston.format.timestamp(),
|
||||
winston.format.json(),
|
||||
),
|
||||
}));
|
||||
logger
|
||||
.add(new winston.transports.Console({ // text part
|
||||
format: winston.format.combine(
|
||||
winston.format.colorize(),
|
||||
winston.format.timestamp(),
|
||||
winston.format.printf(
|
||||
info => `${info.timestamp} - ${info.level} ${info.message}`,
|
||||
),
|
||||
),
|
||||
}))
|
||||
.add(new winston.transports.Console({ // json part
|
||||
format: winston.format.combine(
|
||||
winston.format.timestamp(),
|
||||
winston.format.json(),
|
||||
),
|
||||
}));
|
||||
}
|
||||
|
||||
if (LOGGLY_TOKEN && LOGGLY_SUBDOMAIN) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue