summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2015-02-09 19:49:00 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2015-02-09 19:49:00 (GMT)
commit365701add94255d753d555c6b3833dd8cc6d43a0 (patch)
treeb4f6639641bfd98ca65bb73ef2227351d5c317ed /Doc/library
parent438f9134cfb7a3b68cff9de9f730f42f68c2cc94 (diff)
downloadcpython-365701add94255d753d555c6b3833dd8cc6d43a0.zip
cpython-365701add94255d753d555c6b3833dd8cc6d43a0.tar.gz
cpython-365701add94255d753d555c6b3833dd8cc6d43a0.tar.bz2
Added respect_handler_level to QueueListener.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/logging.handlers.rst11
1 files changed, 9 insertions, 2 deletions
diff --git a/Doc/library/logging.handlers.rst b/Doc/library/logging.handlers.rst
index 48c57cf..67403a9 100644
--- a/Doc/library/logging.handlers.rst
+++ b/Doc/library/logging.handlers.rst
@@ -953,13 +953,20 @@ applications where threads servicing clients need to respond as quickly as
possible, while any potentially slow operations (such as sending an email via
:class:`SMTPHandler`) are done on a separate thread.
-.. class:: QueueListener(queue, *handlers)
+.. class:: QueueListener(queue, *handlers, respect_handler_level=False)
Returns a new instance of the :class:`QueueListener` class. The instance is
initialized with the queue to send messages to and a list of handlers which
will handle entries placed on the queue. The queue can be any queue-
like object; it's passed as-is to the :meth:`dequeue` method, which needs
- to know how to get messages from it.
+ to know how to get messages from it. If ``respect_handler_level`` is ``True``,
+ a handler's level is respected (compared with the level for the message) when
+ deciding whether to pass messages to that handler; otherwise, the behaviour
+ is as in previous Python versions - to always pass each message to each
+ handler.
+
+ .. versionchanged:: 3.5
+ The ``respect_handler_levels`` argument was added.
.. method:: dequeue(block)