[Python-checkins] cpython (merge 3.5 -> 3.6): Issue #21443: Show how to change log level for asyncio. (Merge 3.5->3.6)

guido.van.rossum python-checkins at python.org
Thu Oct 13 16:57:53 EDT 2016


https://hg.python.org/cpython/rev/660058d76788
changeset:   104476:660058d76788
branch:      3.6
parent:      104472:fa6767289ce6
parent:      104475:e68b1b2515e9
user:        Guido van Rossum <guido at python.org>
date:        Thu Oct 13 13:57:17 2016 -0700
summary:
  Issue #21443: Show how to change log level for asyncio. (Merge 3.5->3.6)

files:
  Doc/library/asyncio-dev.rst |  8 ++++++++
  1 files changed, 8 insertions(+), 0 deletions(-)


diff --git a/Doc/library/asyncio-dev.rst b/Doc/library/asyncio-dev.rst
--- a/Doc/library/asyncio-dev.rst
+++ b/Doc/library/asyncio-dev.rst
@@ -161,6 +161,14 @@
 The :mod:`asyncio` module logs information with the :mod:`logging` module in
 the logger ``'asyncio'``.
 
+The default log level for the :mod:`asyncio` module is :py:data:`logging.INFO`.
+For those not wanting such verbosity from :mod:`asyncio` the log level can
+be changed.  For example, to change the level to :py:data:`logging.WARNING`:
+
+.. code-block:: none
+
+   logging.getLogger('asyncio').setLevel(logging.WARNING)
+
 
 .. _asyncio-coroutine-not-scheduled:
 

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list