summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2016-10-13 20:57:39 (GMT)
committerGuido van Rossum <guido@python.org>2016-10-13 20:57:39 (GMT)
commit0b2304786bc0b2e0aa06154b40ace0e8bcefc90f (patch)
tree17668587cd03f00d7cf962bd61a3a6af058224bf /Doc
parente590a03db752882288046c747df983f44aac32c7 (diff)
parenta03b1ea4113f2d7fcdecdbb7209a15ac30b25429 (diff)
downloadcpython-0b2304786bc0b2e0aa06154b40ace0e8bcefc90f.zip
cpython-0b2304786bc0b2e0aa06154b40ace0e8bcefc90f.tar.gz
cpython-0b2304786bc0b2e0aa06154b40ace0e8bcefc90f.tar.bz2
Issue #21443: Show how to change log level for asyncio. (Merge 3.6->3.7)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/asyncio-dev.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/asyncio-dev.rst b/Doc/library/asyncio-dev.rst
index e9ec638..cc4a14b 100644
--- a/Doc/library/asyncio-dev.rst
+++ b/Doc/library/asyncio-dev.rst
@@ -161,6 +161,14 @@ Logging
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: