add important note
This commit is contained in:
parent
d71117cc6d
commit
91a48b2d7d
@ -6,11 +6,8 @@ import { isEmptyObject } from "@/src/helpers/general";
|
|||||||
|
|
||||||
dotenv.config();
|
dotenv.config();
|
||||||
|
|
||||||
const consolelogFormat = format.printf(({ level, message, version, timestamp }) => {
|
//TODO: in production utils.inspect might be slowing down requests
|
||||||
return `${timestamp} [${version}] ${level}: ${message}`;
|
const consolelogFormat = format.printf(info => {
|
||||||
});
|
|
||||||
|
|
||||||
const consolelogFormat2 = format.printf(info => {
|
|
||||||
if (!isEmptyObject(info.metadata)) {
|
if (!isEmptyObject(info.metadata)) {
|
||||||
return `${info.timestamp} [${info.version}] ${info.level}: ${info.message} ${inspect(info.metadata, {
|
return `${info.timestamp} [${info.version}] ${info.level}: ${info.message} ${inspect(info.metadata, {
|
||||||
showHidden: false,
|
showHidden: false,
|
||||||
@ -42,7 +39,7 @@ const consoleLog = new transports.Console({
|
|||||||
format.errors({ stack: true }),
|
format.errors({ stack: true }),
|
||||||
format.align(),
|
format.align(),
|
||||||
format.metadata({ fillExcept: ["message", "level", "timestamp", "version"] }),
|
format.metadata({ fillExcept: ["message", "level", "timestamp", "version"] }),
|
||||||
consolelogFormat2
|
consolelogFormat
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user