adams85 / filelogger

A lightweight yet feature-rich file logger implementation for the Microsoft.Extensions.Logging framework.
MIT License
147 stars 22 forks source link

Is there a MaxAmountOfLogs Property or something like this? #2

Closed janniksam closed 5 years ago

janniksam commented 5 years ago

I don't want to clean it up regularly, so is there an option to clean up the oldest file, when the maximum number of logs is reached?

adams85 commented 5 years ago

Hi Jannik!

There's no such an option built in the library currently and implementing it looks out-of-scope for this project. I don't think cleaning up log files should be a responsibility of a simple log writer component like this.

However, you can easily automate the regular cleanup of your logs by coding a cleanup script of your requirements and scheduling it by whatever scheduler tool your OS provides (Task Scheduler on Windows, cron on Linux, etc.)

janniksam commented 5 years ago

Alright, thank you for the clarification.