diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2015-02-09 19:49:00 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2015-02-09 19:49:00 (GMT) |
commit | 365701add94255d753d555c6b3833dd8cc6d43a0 (patch) | |
tree | b4f6639641bfd98ca65bb73ef2227351d5c317ed /Doc/howto | |
parent | 438f9134cfb7a3b68cff9de9f730f42f68c2cc94 (diff) | |
download | cpython-365701add94255d753d555c6b3833dd8cc6d43a0.zip cpython-365701add94255d753d555c6b3833dd8cc6d43a0.tar.gz cpython-365701add94255d753d555c6b3833dd8cc6d43a0.tar.bz2 |
Added respect_handler_level to QueueListener.
Diffstat (limited to 'Doc/howto')
-rw-r--r-- | Doc/howto/logging-cookbook.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/howto/logging-cookbook.rst b/Doc/howto/logging-cookbook.rst index 57e23f9..e31b6c2 100644 --- a/Doc/howto/logging-cookbook.rst +++ b/Doc/howto/logging-cookbook.rst @@ -325,6 +325,15 @@ which, when run, will produce:: MainThread: Look out! +.. versionchanged:: 3.5 + Prior to Python 3.5, the :class:`QueueListener` always passed every message + received from the queue to every handler it was initialized with. (This was + because it was assumed that level filtering was all done on the other side, + where the queue is filled.) From 3.5 onwards, this behaviour can be changed + by passing a keyword argument ``respect_handler_level=True`` to the + listener's constructor. When this is done, the listener compares the level + of each message with the handler's level, and only passes a message to a + handler if it's appropriate to do so. .. _network-logging: |