Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ba29a4f

Browse files
committed
Issue #21443: Show how to change log level for asyncio.
1 parent b1a751b commit ba29a4f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Doc/library/asyncio-dev.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,14 @@ Logging
161161
The :mod:`asyncio` module logs information with the :mod:`logging` module in
162162
the logger ``'asyncio'``.
163163

164+
The default log level for the :mod:`asyncio` module is :py:data:`logging.INFO`.
165+
For those not wanting such verbosity from :mod:`asyncio` the log level can
166+
be changed. For example, to change the level to :py:data:`logging.WARNING`:
167+
168+
.. code-block:: none
169+
170+
logging.getLogger('asyncio').setLevel(logging.WARNING)
171+
164172
165173
.. _asyncio-coroutine-not-scheduled:
166174

0 commit comments

Comments
 (0)