Open bkvishe opened 6 months ago
I think it works as expected, but IMHO that makes sense to change the default behavior.
https://github.com/mcollina/pino-roll?tab=readme-ov-file#options
Please not that limit only considers created log files. It will not consider any pre-existing files. Therefore, starting your logger with a limit will never tries deleting older log files, created during previous executions.
Below is my Pino configuration that utilizes the Pino-roll plugin for file rotation based on specified criteria. However, an issue arises upon application restart where the logger continues pointing to the old file, even after it has exceeded the rotation criteria.
Please refer to the below screenshot, where despite the file
combine.1.log
surpassing the rotation criteria and a new filecombine.2.log
being created by pino-roll, upon the application restart, the logger reverts back the pointing to the old filecombine.1.log
.