Closed Vishal8523 closed 2 years ago
Versions: winston: ^2.4.5 winston-daily-rotate-file: ^3.10.0 Node JS: v12.22.0 OS: Debian 11 Bullseye
During the logs rotate mechanism, once the log file reaches the maxSize, the file is not rotated. Considering multiple node processes are writing to the same log file.
Winston Settings:
const logger = new winston.Logger({ transports: [ new winston.transports.Console({ level: 'info', colorize: true, prettyPrint: true, timestamp: true }), new winston.transports.DailyRotateFile({ filename: Logs-%DATE%.log, datePattern: 'YYYY-MM-DD', dirname: /logs/, level: 'info', json: false, prettyPrint: true, timestamp: true, zippedArchive: false, maxSize: 100m, maxFiles: 7d }) ] });
Request for solutions
Why do you have multiple Node processes writing to the same file? When one has a write lock that can prevent the other one from rotating it out.
Ok. Thanks for the inputs.
Versions: winston: ^2.4.5 winston-daily-rotate-file: ^3.10.0 Node JS: v12.22.0 OS: Debian 11 Bullseye
During the logs rotate mechanism, once the log file reaches the maxSize, the file is not rotated. Considering multiple node processes are writing to the same log file.
Winston Settings:
Request for solutions