I am thinking of using the log rotation feature of Winston. Is there any way to limit the number of log files. For example if I am rotating files daily, is there a way to specify I want to keep only logs for last three days ?
From the comments - @Aleksandr M
maxFiles is that property.
It could read like this:
dailyRotateFile: {
colorize: false,
timestamp: true,
datePattern: '.yyyy-MM-ddTHH-mm',
filename: filename,
maxFiles: 5,
maxsize: 100000000,
json: false
}