-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
backupCount is not respected in TimedRotatingFileHandler when namer is specified #88916
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
Comments
after adding namer callable (like it is described in https://bugs.python.org/issue43344) to log handler configuration, it stopped removing old files log_filename = os.path.join(log_dir, "application.log")
log_handler = logging.handlers.TimedRotatingFileHandler(log_filename, when='MIDNIGHT', interval=1, backupCount=7) // after adding this line, old files are not deleted |
Should be fixed in main, leaving open until backports are done. |
Thanks for the bug report. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: