Skip to content

Commit 844a9d6

Browse files
miss-islingtonvsajip
authored andcommitted
bpo-37470: Document more clearly the error handling for QueueHandler.emit(). (GH-14532) (GH-14534)
(cherry picked from commit 0f4e813)
1 parent b0ab95b commit 844a9d6

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
@@ -980,7 +980,12 @@ possible, while any potentially slow operations (such as sending an email via
980980

981981
.. method:: emit(record)
982982

983-
Enqueues the result of preparing the LogRecord.
983+
Enqueues the result of preparing the LogRecord. Should an exception
984+
occur (e.g. because a bounded queue has filled up), the
985+
:meth:`~logging.Handler.handleError` method is called to handle the
986+
error. This can result in the record silently being dropped (if
987+
:attr:`logging.raiseExceptions` is ``False``) or a message printed to
988+
``sys.stderr`` (if :attr:`logging.raiseExceptions` is ``True``).
984989

985990
.. method:: prepare(record)
986991

0 commit comments

Comments
 (0)