Visitar URL original
gh-92592: Allow logging filters to return a LogRecord. (GH-92591) by adriangb · Pull Request #92591 · python/cpython · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update logging-cookbook.rst
  • Loading branch information
vsajip authored Jun 7, 2022
commit 7a0f4708e3a396b35d222314aa83286041cc0972
4 changes: 1 addition & 3 deletions Doc/howto/logging-cookbook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -719,9 +719,7 @@ Imparting contextual information in handlers
Each :class:`~Handler` has its own chain of filters.
If you want to add contextual information to a :class:`LogRecord` without leaking
it to other handlers, you can use a filter that returns
a new :class:`~LogRecord` instead of modifying it in-place:

script::
a new :class:`~LogRecord` instead of modifying it in-place, as shown in the following script::

import copy
import logging
Expand Down