]> granicus.if.org Git - python/commitdiff
bpo-37470: Document more clearly the error handling for QueueHandler.emit(). (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 1 Jul 2019 19:53:39 +0000 (12:53 -0700)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Mon, 1 Jul 2019 19:53:39 +0000 (20:53 +0100)
(cherry picked from commit 0f4e8132820947d93eccf31b9e526b81c6ffa53d)

Doc/library/logging.handlers.rst

index d5944ec87d2d85de703b395a59b90a6c081de831..32919c1a2e29096dd8e463eeb1a51cfc4e58215b 100644 (file)
@@ -980,7 +980,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)