]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-65046: Fix docs about logging in `asyncio` (GH-97559)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 26 Sep 2022 22:37:38 +0000 (15:37 -0700)
committerGitHub <noreply@github.com>
Mon, 26 Sep 2022 22:37:38 +0000 (15:37 -0700)
Explain that logging should not use network I/O.
(cherry picked from commit d68c37c0d08542a346a13b150a204208bb0408f5)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Doc/library/asyncio-dev.rst

index 02a00033152aba764c3ad04daa55ed87493b7199..aed312bfec06a8fdf94890453593042b6cee13b7 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