Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cpython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sip
Cpython
Commits
5c110d11
Unverified
Commit
5c110d11
authored
Sep 28, 2022
by
Vinay Sajip
Committed by
GitHub
Sep 28, 2022
Browse files
Options
Downloads
Patches
Plain Diff
gh-65046: Add note about logging from async code. (GH-97602)
parent
d582edf0
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Doc/howto/logging-cookbook.rst
+8
-0
8 additions, 0 deletions
Doc/howto/logging-cookbook.rst
with
8 additions
and
0 deletions
Doc/howto/logging-cookbook.rst
+
8
−
0
View file @
5c110d11
...
...
@@ -397,6 +397,14 @@ which, when run, will produce:
MainThread: Look out!
.. note:: Although the earlier discussion wasn't specifically talking about
async code, but rather about slow logging handlers, it should be noted that
when logging from async code, network and even file handlers could lead to
problems (blocking the event loop) because some logging is done from
:mod:`asyncio` internals. It might be best, if any async code is used in an
application, to use the above approach for logging, so that any blocking code
runs only in the ``QueueListener`` thread.
.. versionchanged:: 3.5
Prior to Python 3.5, the :class:`QueueListener` always passed every message
received from the queue to every handler it was initialized with. (This was
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment