Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically clean up old log files #2609

Open
dgw opened this issue May 26, 2024 · 2 comments
Open

Automatically clean up old log files #2609

dgw opened this issue May 26, 2024 · 2 comments
Labels
Milestone

Comments

@dgw
Copy link
Member

dgw commented May 26, 2024

Requested Feature

Sopel should clean up log files older than some default number of days, with a configuration option to override it.

Problems Solved

Our main Sopel instance started spitting out errors tonight when its jail ran out of disk quota. This feature would prevent similar issues from happening to other users who don't set up an external mechanism to prune logs.

Alternatives

As alluded to above, a cron job or other recurring task could take care of this—at the cost of extra effort from the bot owner.

Notes

The TimedRotatingFileHandler's backupCount option would be a simple way to implement this.

@dgw dgw added the Feature label May 26, 2024
@dgw dgw added this to the 8.1.0 milestone May 26, 2024
@SnoopJ
Copy link
Contributor

SnoopJ commented May 26, 2024 via email

@dgw
Copy link
Member Author

dgw commented May 26, 2024

Sopel already uses TimedRotatingFileHandler to get a new log file each day. It's just not configured to delete old logs, ever, so they build up indefinitely. Our main instance has had raw and debug logs turned on for a long time, which made it a problem much faster than it should ever impact normal use. 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants