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
logging module broken for multiple threads? #42329
Comments
After upgrading from python 2.2, I noticed that the As far as I can tell, after spending a bit of time Traceback (most recent call last):
File "/usr/lib/python2.4/logging/__init__.py", line
712, in emit
self.stream.write(fs % msg)
ValueError: I/O operation on closed file The code that initializes the logger is as follows:
%(levelname)s: %(message)s') Alone, this works fine. It is only when a the second |
Logged In: YES It looks to me like you've created a race condition that |
Logged In: YES I'm attaching a minimal program that demonstrates the |
Logged In: YES file attached |
1 similar comment
Logged In: YES file attached |
Logged In: YES Here's an even more minimal snippet of code that produces Does this code do something to abuse the logging facility? |
Logged In: YES The problem is occurring because the main thread exits, raw_input("Press a key:") or mythread.join() Then the thread continues to run: 2005-09-02 10:23:37,023 2564 INFO: logging initialized (I modified the format string to show the thread ID in the Hence, this is not a bug and I am closing this entry |
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: