[issue41433] Logging libraries BufferingHandler flushed twice at shutdown

Tatsunosuke Shimada report at bugs.python.org
Wed Jul 29 01:57:24 EDT 2020


New submission from Tatsunosuke Shimada <adam.is.t521 at gmail.com>:

BufferingHandler

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
https://github.com/python/cpython/blob/0124f2b5e0f88ee7f5d40fca96dbf087cbe4764b/Lib/logging/handlers.py#L1286
https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Lib/logging/__init__.py#L2151

This issue could be also related.
https://bugs.python.org/issue26559

----------
components: Library (Lib)
messages: 374559
nosy: adamist521, vinay.sajip
priority: normal
severity: normal
status: open
title: Logging libraries BufferingHandler flushed twice at shutdown
type: behavior
versions: Python 3.8

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


More information about the Python-bugs-list mailing list