Open mai1x9 opened 7 months ago
@mai1x9 try to disable archiving as @hyavari suggested in https://github.com/winstonjs/winston-daily-rotate-file/issues/380#issuecomment-1885516202.
Archiving and deleting at the same time doesn't make sense :)
@mai1x9
the situation below will work
// frequency work
const transport = new winston.transports.DailyRotateFile({
filename: application-%DATE%.log,
datePattern: 'YYYY-MM-DD_HH-mm-ss',
frequency: '3600s',
zippedArchive: true,
maxSize: '30k',
maxFiles: '14d'
});
but this won't
// frequency not work
const transport = new winston.transports.DailyRotateFile({
filename: application-%DATE%.log,
datePattern: 'YYYY-MM-DD_HH-mm-ss',
frequency: '1h',
zippedArchive: true,
maxSize: '30k',
maxFiles: '14d'
});
and if log file reaches maxSize , after archived , the new log filename will be exactly "application-%DATE%.log"... so weird ...
on the other hand, the maxSize should be "1k" not "1kb"
As expected even if size of log is > 1kb it is not rotated. Even freqeuncy is not working .