This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: StreamHandler does not print to sys.stderr immediately
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.9
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: MunchDev
Priority: normal Keywords:

Created on 2021-04-07 08:07 by MunchDev, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
logger.py MunchDev, 2021-04-07 08:07 Logging configuration
Messages (2)
msg390404 - (view) Author: Nguyen Thai Binh (MunchDev) Date: 2021-04-07 08:07
When logger.exception() is called in a `catch` clause, it never logs to sys.stderr immediately. Sometimes it only outputs when the program almost finishes. I don't know how to reproduce as it is occasional. Attached is the logging configuration for my program.

Thank you.
msg390405 - (view) Author: Nguyen Thai Binh (MunchDev) Date: 2021-04-07 08:27
I have managed to solve this by flushing the buffer. So issue closed.
History
Date User Action Args
2022-04-11 14:59:43adminsetgithub: 87925
2021-04-07 11:48:47eric.smithsetresolution: fixed -> not a bug
2021-04-07 08:27:06MunchDevsetstatus: open -> closed
resolution: fixed
messages: + msg390405

stage: resolved
2021-04-07 08:07:48MunchDevcreate