]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-65046: Fix docs about logging in `asyncio` (#97559)
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Mon, 26 Sep 2022 22:27:15 +0000 (03:57 +0530)
committerGitHub <noreply@github.com>
Mon, 26 Sep 2022 22:27:15 +0000 (15:27 -0700)
Explain that logging should not use network I/O.

Doc/library/asyncio-dev.rst

index 77f1128de50c955122e7821cf81c6bfe7f0a4b8a..9676a352f4b24e16c3a09a3b2aeac4fb4644fbb7 100644 (file)
@@ -148,6 +148,10 @@ adjusted::
    logging.getLogger("asyncio").setLevel(logging.WARNING)
 
 
+Network logging can block the event loop. It is recommended to use
+a separate thread for handling logs or use non-blocking IO.
+
+
 .. _asyncio-coroutine-not-scheduled:
 
 Detect never-awaited coroutines