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