summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMario Corchero <mcorcherojim@bloomberg.net>2022-01-24 12:39:50 (GMT)
committerGitHub <noreply@github.com>2022-01-24 12:39:50 (GMT)
commitd7c68639795a576ff58b6479c8bb34c113df3618 (patch)
treecb14dbe941f837f0c36f785c59d9d22b9d1fccca /Doc
parent58f3d980989c7346ad792d464c1d749dcec6af63 (diff)
downloadcpython-d7c68639795a576ff58b6479c8bb34c113df3618.zip
cpython-d7c68639795a576ff58b6479c8bb34c113df3618.tar.gz
cpython-d7c68639795a576ff58b6479c8bb34c113df3618.tar.bz2
bpo-41906: Accept built filters in dictConfig (GH-30756)
When configuring the logging stack, accept already built filters (or just callables) in the filters array of loggers and handlers. This facilitates passing quick callables as filters. Automerge-Triggered-By: GH:vsajip
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/logging.config.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/logging.config.rst b/Doc/library/logging.config.rst
index a1b8dc7..c979961 100644
--- a/Doc/library/logging.config.rst
+++ b/Doc/library/logging.config.rst
@@ -288,6 +288,9 @@ otherwise, the context is used to determine what to instantiate.
* ``filters`` (optional). A list of ids of the filters for this
handler.
+ .. versionchanged:: 3.11
+ ``filters`` can take filter instances in addition to ids.
+
All *other* keys are passed through as keyword arguments to the
handler's constructor. For example, given the snippet:
@@ -326,6 +329,9 @@ otherwise, the context is used to determine what to instantiate.
* ``filters`` (optional). A list of ids of the filters for this
logger.
+ .. versionchanged:: 3.11
+ ``filters`` can take filter instances in addition to ids.
+
* ``handlers`` (optional). A list of ids of the handlers for this
logger.
@@ -524,6 +530,10 @@ valid keyword parameter name, and so will not clash with the names of
the keyword arguments used in the call. The ``'()'`` also serves as a
mnemonic that the corresponding value is a callable.
+ .. versionchanged:: 3.11
+ The ``filters`` member of ``handlers`` and ``loggers`` can take
+ filter instances in addition to ids.
+
.. _logging-config-dict-externalobj: