This commit is contained in:
parent
91d5b90eb0
commit
992409bf86
@ -5,7 +5,7 @@ const isProd = process.env.NODE_ENV === "production"
|
||||
|
||||
const transports: any[] = [
|
||||
new winston.transports.Console({
|
||||
level: isProd ? "info" : "debug",
|
||||
level: isProd ? "info" : "silly",
|
||||
}),
|
||||
]
|
||||
|
||||
@ -16,15 +16,6 @@ if (isProd) {
|
||||
maxSize: "20m",
|
||||
maxFiles: "14d",
|
||||
}
|
||||
|
||||
transports.push(
|
||||
new DailyRotateFile({
|
||||
level: "info",
|
||||
filename:
|
||||
process.env.LOG_FILE_NAME_INFO ?? "/home/work/log/egg-info-%DATE%.log",
|
||||
...config,
|
||||
})
|
||||
)
|
||||
transports.push(
|
||||
new DailyRotateFile({
|
||||
level: "debug",
|
||||
@ -34,6 +25,16 @@ if (isProd) {
|
||||
...config,
|
||||
})
|
||||
)
|
||||
|
||||
transports.push(
|
||||
new DailyRotateFile({
|
||||
level: "silly",
|
||||
filename:
|
||||
process.env.LOG_FILE_NAME_SILLY ??
|
||||
"/home/work/log/egg-silly-%DATE%.log",
|
||||
...config,
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
const formatList = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user