bpo-37470: Document more clearly the error handling for QueueHandler.emit(). (GH-14532)

This commit is contained in:
Vinay Sajip 2019-07-01 20:45:01 +01:00 committed by GitHub
parent 67310023f2
commit 0f4e813282
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -1001,7 +1001,12 @@ possible, while any potentially slow operations (such as sending an email via
.. method:: emit(record)
Enqueues the result of preparing the LogRecord.
Enqueues the result of preparing the LogRecord. Should an exception
occur (e.g. because a bounded queue has filled up), the
:meth:`~logging.Handler.handleError` method is called to handle the
error. This can result in the record silently being dropped (if
:attr:`logging.raiseExceptions` is ``False``) or a message printed to
``sys.stderr`` (if :attr:`logging.raiseExceptions` is ``True``).
.. method:: prepare(record)