mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Issue #21443: Show how to change log level for asyncio. (Merge 3.5->3.6)
This commit is contained in:
commit
a03b1ea411
1 changed files with 8 additions and 0 deletions
|
@ -161,6 +161,14 @@ Logging
|
||||||
The :mod:`asyncio` module logs information with the :mod:`logging` module in
|
The :mod:`asyncio` module logs information with the :mod:`logging` module in
|
||||||
the logger ``'asyncio'``.
|
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:
|
.. _asyncio-coroutine-not-scheduled:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue