From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 12 Oct 2022 04:51:13 +0000 (-0700) Subject: gh-65046: Link to logging cookbook from asyncio docs (GH-98207) X-Git-Tag: v3.11.0~136 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=168ec080e8c537cc1e7c93237afcb3c44d393358;p=thirdparty%2FPython%2Fcpython.git gh-65046: Link to logging cookbook from asyncio docs (GH-98207) (cherry picked from commit c39a0c335486fa8eac0f3030930f9e8769118a4f) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> --- diff --git a/Doc/howto/logging-cookbook.rst b/Doc/howto/logging-cookbook.rst index 10639b15a47c..25ea37fc5ac9 100644 --- a/Doc/howto/logging-cookbook.rst +++ b/Doc/howto/logging-cookbook.rst @@ -537,6 +537,8 @@ configuration:: print('complete') +.. _blocking-handlers: + Dealing with handlers that block -------------------------------- diff --git a/Doc/library/asyncio-dev.rst b/Doc/library/asyncio-dev.rst index 77f1128de50c..29d69b9f748d 100644 --- a/Doc/library/asyncio-dev.rst +++ b/Doc/library/asyncio-dev.rst @@ -148,6 +148,11 @@ 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. For example, +see :ref:`blocking-handlers`. + + .. _asyncio-coroutine-not-scheduled: Detect never-awaited coroutines