[Python-checkins] cpython (merge 3.6 -> default): Issue #21443: Show how to change log level for asyncio. (Merge 3.6->3.7)
guido.van.rossum
python-checkins at python.org
Thu Oct 13 16:58:07 EDT 2016
https://hg.python.org/cpython/rev/861d22bd852d
changeset: 104477:861d22bd852d
parent: 104473:c78770ae8442
parent: 104476:660058d76788
user: Guido van Rossum <guido at python.org>
date: Thu Oct 13 13:57:39 2016 -0700
summary:
Issue #21443: Show how to change log level for asyncio. (Merge 3.6->3.7)
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