summaryrefslogtreecommitdiff
path: root/Doc/howto/logging-cookbook.rst
diff options
context:
space:
mode:
authorAndrew Kuchling <amk@amk.ca>2015-04-14 10:35:43 -0400
committerAndrew Kuchling <amk@amk.ca>2015-04-14 10:35:43 -0400
commit3b3863c2d496f01845eda76ccf6401458714397e (patch)
tree14af5692bc33ffc3a589478b03e33e597ce17166 /Doc/howto/logging-cookbook.rst
parentb6b4ba499008572740b20b22481074263fb4e5d7 (diff)
parentda4c26c69f751f7c0207b009b2372bdc12c08bba (diff)
downloadcpython-3b3863c2d496f01845eda76ccf6401458714397e.tar.gz
Merge from 3.4
Diffstat (limited to 'Doc/howto/logging-cookbook.rst')
-rw-r--r--Doc/howto/logging-cookbook.rst11
1 files changed, 10 insertions, 1 deletions
diff --git a/Doc/howto/logging-cookbook.rst b/Doc/howto/logging-cookbook.rst
index 114ec09b74..e31b6c2bf4 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:
@@ -1680,7 +1689,7 @@ as in the following complete example::
def main():
logging.basicConfig(level=logging.INFO, format='%(message)s')
- logging.info(_('message 1', set_value=set([1, 2, 3]), snowman='\u2603'))
+ logging.info(_('message 1', set_value={1, 2, 3}, snowman='\u2603'))
if __name__ == '__main__':
main()