diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-10-30 19:17:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-30 19:17:59 +0300 |
commit | 745e11426f6364106ad56fecdbdb12ac32feb811 (patch) | |
tree | 97618284b424ea23e9ca9bdee4243e36453c91a4 /sphinx/util | |
parent | 2b5c55e45a0fc4e2197a9b8edb482b77c2fa3f85 (diff) | |
parent | b1c0d1f00eb4425a36b8bf9272173146e5abed3f (diff) |
Merge pull request #9772 from gibsondan/loggingflush
Closes #9733: Fix for logging handler flushing warnings in the middle of the docs build
Diffstat (limited to 'sphinx/util')
-rw-r--r-- | sphinx/util/logging.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sphinx/util/logging.py b/sphinx/util/logging.py index e18d82469..d4d843e58 100644 --- a/sphinx/util/logging.py +++ b/sphinx/util/logging.py @@ -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: |