-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Multiple TimedRotatingFileHandler with similar names but different backup counts do not work #93205
Comments
Please note that a similar test case using just |
ilCatania
added a commit
to ilCatania/cpython
that referenced
this issue
May 25, 2022
serhiy-storchaka
pushed a commit
that referenced
this issue
Feb 21, 2024
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Feb 21, 2024
…le extension (pythonGH-93224) (cherry picked from commit 113687a) Co-authored-by: Gabriele Catania <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Feb 21, 2024
…le extension (pythonGH-93224) (cherry picked from commit 113687a) Co-authored-by: Gabriele Catania <[email protected]>
serhiy-storchaka
pushed a commit
that referenced
this issue
Feb 21, 2024
…ole extension (GH-93224) (GH-115784) (cherry picked from commit 113687a) Co-authored-by: Gabriele Catania <[email protected]>
serhiy-storchaka
pushed a commit
that referenced
this issue
Feb 21, 2024
…ole extension (GH-93224) (GH-115785) (cherry picked from commit 113687a) Co-authored-by: Gabriele Catania <[email protected]>
woodruffw
pushed a commit
to woodruffw-forks/cpython
that referenced
this issue
Mar 4, 2024
diegorusso
pushed a commit
to diegorusso/cpython
that referenced
this issue
Apr 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
When setting up multiple logging handlers of type
TimedRotatingFileHandler
that log to the same directory and only differ by the file extension, rollover does not work properly for either of them.Consider this configuration:
running this for several seconds should cause the logging directory to have 5 files (time stamps would obviously vary based on when you run it) :
However, the second handler deletes files that should only match the first handler, so it ends up not deleting its own files:
Digging through code this seems to be caused by the change in bpo-44753 aka #88916, reverting this change solves the issue for me.
Here's the full code to reproduce the issue:
Your environment
Tested this with Python 3.9.7 and 3.10.4, and with the current development cpython code.
Linux 3.10.0-957.27.2.el7.x86_64 #1 SMP Mon Jul 29 17:46:05 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Linked PRs
The text was updated successfully, but these errors were encountered: