[issue38674] RotatingFileHandler issue: logs in the file are printed in incorrect order.

Vinay Sajip report at bugs.python.org
Mon Nov 4 03:18:53 EST 2019


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

You're doing it wrong. I inserted a print statement just before the RotatingFileHandler for email.log is created. Here's what was printed:

Creating RFH email.log
Creating RFH email.log
Creating RFH email.log
Creating RFH email.log
Creating RFH email.log

In the above, RFH is short for RotatingFileHandler. You're creating five handlers for the same file. Because you are doing this, things won't work as expected - you're not supposed to have multiple handlers pointing to the same file. They will trample over each other and the resulting behaviour will be ill-defined.

In future, I suggest you post your problem on Stack Overflow, python-list or some similar forum to establish whether there is really a Python bug or whether it's a problem in your own code. Posting a new issue when there isn't actually one wastes volunteer time that could be better spent on actual bugs - time spent on triaging, investigating and updating the issue.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38674>
_______________________________________


More information about the Python-bugs-list mailing list