This commit is contained in:
David Arranz 2024-09-08 22:01:07 +02:00
parent ca9ae75185
commit 53942e7fef

View File

@ -28,7 +28,7 @@ function initLogger(rTracer) {
}
return out;
}),
})
);
const fileFormat = format.combine(
@ -38,11 +38,11 @@ function initLogger(rTracer) {
//format.metadata(),
format.metadata({ fillExcept: ["message", "level", "timestamp", "label"] }),
format.simple(),
format.json(),
format.json()
);
const logger = createLogger({
level: process.env.NODE_ENV === "production" ? "info" : "debug",
level: process.env.NODE_ENV === "production" ? "debug" : "debug",
format: fileFormat,
@ -70,14 +70,14 @@ function initLogger(rTracer) {
// If we're not in production then log to the `console` with the format:
// `${info.level}: ${info.message} JSON.stringify({ ...rest }) `
//
if (!config.isProduction) {
logger.add(
new transports.Console({
format: consoleFormat,
level: "debug",
}),
);
}
//if (!config.isProduction) {
logger.add(
new transports.Console({
format: consoleFormat,
level: "debug",
})
);
//}
return logger;
}