This commit is contained in:
parent
25af9b763b
commit
867edc964d
@ -1,6 +1,5 @@
|
|||||||
import "winston-daily-rotate-file"
|
|
||||||
|
|
||||||
import winston, { format } from "winston"
|
import winston, { format } from "winston"
|
||||||
|
import DailyRotateFile from "winston-daily-rotate-file"
|
||||||
|
|
||||||
const isProd = process.env.NODE_ENV === "production"
|
const isProd = process.env.NODE_ENV === "production"
|
||||||
|
|
||||||
@ -19,7 +18,7 @@ if (isProd) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
transports.push(
|
transports.push(
|
||||||
new winston.transports.DailyRotateFile({
|
new DailyRotateFile({
|
||||||
level: "info",
|
level: "info",
|
||||||
filename:
|
filename:
|
||||||
process.env.LOG_FILE_NAME_INFO ?? "/home/work/log/egg-info-%DATE%.log",
|
process.env.LOG_FILE_NAME_INFO ?? "/home/work/log/egg-info-%DATE%.log",
|
||||||
@ -27,7 +26,7 @@ if (isProd) {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
transports.push(
|
transports.push(
|
||||||
new winston.transports.DailyRotateFile({
|
new DailyRotateFile({
|
||||||
level: "debug",
|
level: "debug",
|
||||||
filename:
|
filename:
|
||||||
process.env.LOG_FILE_NAME_DEBUG ??
|
process.env.LOG_FILE_NAME_DEBUG ??
|
||||||
|
Loading…
x
Reference in New Issue
Block a user