summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2023-01-27 14:50:09 (GMT)
committerGitHub <noreply@github.com>2023-01-27 14:50:09 (GMT)
commitd083df39fa61dc27b3c22a7bc06a71e95b718fa3 (patch)
tree3d9bbce6044b52d56d1edb2a16dcc64254cf85a7
parent737d367b1f4bad76914173a64d6bbe19a984cd5f (diff)
downloadcpython-d083df39fa61dc27b3c22a7bc06a71e95b718fa3.zip
cpython-d083df39fa61dc27b3c22a7bc06a71e95b718fa3.tar.gz
cpython-d083df39fa61dc27b3c22a7bc06a71e95b718fa3.tar.bz2
[doc] Add some notices to logging configuration documentation. (GH-101373)
-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 9b82c1f..b4d0da1 100644
--- a/Doc/library/logging.config.rst
+++ b/Doc/library/logging.config.rst
@@ -525,6 +525,11 @@ returned by the call::
my.package.customFormatterFactory(bar='baz', spam=99.9, answer=42)
+.. warning:: The values for keys such as ``bar``, ``spam`` and ``answer`` in
+ the above example should not be configuration dictionaries or references such
+ as ``cfg://foo`` or ``ext://bar``, because they will not be processed by the
+ configuration machinery, but passed to the callable as-is.
+
The key ``'()'`` has been used as the special key because it is not a
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
@@ -553,6 +558,11 @@ following configuration::
the returned formatter will have attribute ``foo`` set to ``'bar'`` and
attribute ``baz`` set to ``'bozz'``.
+.. warning:: The values for attributes such as ``foo`` and ``baz`` in
+ the above example should not be configuration dictionaries or references such
+ as ``cfg://foo`` or ``ext://bar``, because they will not be processed by the
+ configuration machinery, but set as attribute values as-is.
+
.. _logging-config-dict-externalobj: