mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #9772 from gibsondan/loggingflush
Closes #9733: Fix for logging handler flushing warnings in the middle of the docs build
This commit is contained in:
commit
745e11426f
@ -171,6 +171,11 @@ class MemoryHandler(logging.handlers.BufferingHandler):
|
||||
def shouldFlush(self, record: logging.LogRecord) -> bool:
|
||||
return False # never flush
|
||||
|
||||
def flush(self) -> None:
|
||||
# suppress any flushes triggered by importing packages that flush
|
||||
# all handlers at initialization time
|
||||
pass
|
||||
|
||||
def flushTo(self, logger: logging.Logger) -> None:
|
||||
self.acquire()
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user