diff --git a/packages/logger/src/index.ts b/packages/logger/src/index.ts index 07b3409..a807d7a 100644 --- a/packages/logger/src/index.ts +++ b/packages/logger/src/index.ts @@ -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 ??