如何限制winston日志文件到一个特定的数字

我正在考虑使用Winston的日志旋转function。 有什么办法来限制日志文件的数量。 例如,如果我每天轮换文件,有没有办法指定我只想保留最近三天的日志?

从评论 – @Aleksandr M

maxFiles是该属性。

它可以这样读:

 dailyRotateFile: { colorize: false, timestamp: true, datePattern: '.yyyy-MM-ddTHH-mm', filename: filename, maxFiles: 5, maxsize: 100000000, json: false }