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
QueueHandler formatting affects other handlers #79907
Comments
ISSUE: if you add a formatter to QueueHandler any subsequently added handlers will get the formatting added to QueueHandler CAUSE: as best as I can tell, the code here: cpython/Lib/logging/handlers.py Line 1380 in d586ccb
is modifying the record object so when it get passed to the next handler here: cpython/Lib/logging/__init__.py Line 1656 in d586ccb
it includes the formatting applied by the QueueHandler's formatter. I worked around this issue by moving my formatter from the QueueHandler to the QueueListener I've attached a simple example of the issue NOTE: I marked this as Python 3.7 because that's what I'm using, but I looked at github and the code is in master so I assume this affects 3.8 too. |
I have already work on a PR for it |
Any idea why the same PR appears three times in the PR list? Is it because for some reason you've added the issue link multiple times in the PR, when it's not needed? |
@vinay.sajip It's known issue discussed here python/bugs.python.org#12 |
Merged for 3.8, will add backport labels to PR in due course. |
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: