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