summaryrefslogtreecommitdiffstats
path: root/Doc/library/logging.handlers.rst
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2019-07-01 19:45:01 (GMT)
committerGitHub <noreply@github.com>2019-07-01 19:45:01 (GMT)
commit0f4e8132820947d93eccf31b9e526b81c6ffa53d (patch)
treea564ad25ab092a72b122ba41a96ed863aeb71af7 /Doc/library/logging.handlers.rst
parent67310023f299b5a2fad71fca449b46d280036690 (diff)
downloadcpython-0f4e8132820947d93eccf31b9e526b81c6ffa53d.zip
cpython-0f4e8132820947d93eccf31b9e526b81c6ffa53d.tar.gz
cpython-0f4e8132820947d93eccf31b9e526b81c6ffa53d.tar.bz2
bpo-37470: Document more clearly the error handling for QueueHandler.emit(). (GH-14532)
Diffstat (limited to 'Doc/library/logging.handlers.rst')
-rw-r--r--Doc/library/logging.handlers.rst7
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/library/logging.handlers.rst b/Doc/library/logging.handlers.rst
index 592d7e5..b7445a1 100644
--- a/Doc/library/logging.handlers.rst
+++ b/Doc/library/logging.handlers.rst
@@ -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)