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.

Title: Logging libraries BufferingHandler flushed twice at shutdown
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.8
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: adamist521, iritkatriel, vinay.sajip
Priority: normal Keywords:

Created on 2020-07-29 05:57 by adamist521, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (5)
msg374559 - (view) Author: Tatsunosuke Shimada (adamist521) Date: 2020-07-29 05:57

I expected function flush of BufferingHandler called once but it is called twice. 
This is due to that shutdown calls flush before close function which calls flush function inside.
(Faced this issue on my custom implementation of flush function.)

Seems that there is no need of calling flush inside BufferingHandler.

Following is the link to the code of function shutdown and Buffering Handler

This issue could be also related.
msg374560 - (view) Author: Tatsunosuke Shimada (adamist521) Date: 2020-07-29 06:07
Found related issue.
msg375012 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2020-08-07 16:31
I think this may be the same issue as in:

Did you call flush on super()?

If this is not the same issue, please post a code snippet to explain what exactly you are seeing.
msg379039 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2020-10-19 22:23
adamist521, is your issue resolved by now? Does calling flush() on super help?

If not, can you please provide a script demonstrating the problem?
msg384849 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-01-11 17:00
I'm assuming the link solved your issue. If you are still having a problem please create a new issue, and include a code snippet to show what you are doing exactly.
Date User Action Args
2022-04-11 14:59:34adminsetgithub: 85605
2021-01-11 17:00:10iritkatrielsetstatus: open -> closed
resolution: not a bug
messages: + msg384849

stage: resolved
2020-10-19 22:23:14iritkatrielsetmessages: + msg379039
2020-08-07 16:31:49iritkatrielsetnosy: + iritkatriel
messages: + msg375012
2020-07-29 06:07:05adamist521setmessages: + msg374560
2020-07-29 05:57:24adamist521create