Closed Crypt32 closed 2 years ago
Take a look to this: https://github.com/nreco/logging/issues/25
In short, LoggerProvider doesn't perform any clean-ups because after an app restart it simply doesn't have a technical possibility to determine what log files were created previously. If you need this kind of logic you can implement it as part of your app (say, delete all files on the app start that older than 30 days or smth like that).
Makes sense, thanks!
First of all, thanks for this useful provider!
We use logs with names based on timestamps like this:
However, we observed that older log files generated in previous app executions are not deleted. Is this by design and we need to write our own cleanup logic or it is because how we generate file names?