Skip to content

Commit 0f4e813

Browse files
authored
bpo-37470: Document more clearly the error handling for QueueHandler.emit(). (GH-14532)
1 parent 6731002 commit 0f4e813

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Doc/library/logging.handlers.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,12 @@ possible, while any potentially slow operations (such as sending an email via
10011001

10021002
.. method:: emit(record)
10031003

1004-
Enqueues the result of preparing the LogRecord.
1004+
Enqueues the result of preparing the LogRecord. Should an exception
1005+
occur (e.g. because a bounded queue has filled up), the
1006+
:meth:`~logging.Handler.handleError` method is called to handle the
1007+
error. This can result in the record silently being dropped (if
1008+
:attr:`logging.raiseExceptions` is ``False``) or a message printed to
1009+
``sys.stderr`` (if :attr:`logging.raiseExceptions` is ``True``).
10051010

10061011
.. method:: prepare(record)
10071012

0 commit comments

Comments
 (0)