Closed OzzyHelix closed 9 months ago
my goal with this is to improve small Quality of life stuff with the bot this has been an annoyance for me for some time
So Python logging does have a file handler that theoretically will do what you want, essentially making the log system handle rotation of the log files as-needed, but only triggered by logs being emitted in the first place rather than the current implementation in dev
which only bothers to rotate files at shutdown, when logging is finished.
I will retract this because python run.py --logs-kept 100
suites my needs perfectly
I will retract this because
python run.py --logs-kept 100
suites my needs perfectly
And for setting the date format using --log-rotate-fmt
you can use the table on this page to understand the '%' formats that are available for use: https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior
What new feature would you like to see?
This is a simply request. I would like it if the logs filenames contained the date and time of their creation and then maybe have a routine that every time the bot is started up. It deletes logs older than say 7 days for example. Overwriting the existing log file has been a pet peeve of mine for a while. Having log files with date and time based filenames and a routine to clean older logs up would fix a lot of my problems with the logging system. I hope you will consider this and maybe make it a feature thank you
Which of these categories fit your request?
Other
Just checking...
review
branch.