Skip to content

[3.11] [doc] Add some notices to logging configuration documentation. (GH-101373) (GH-101376) #101376

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 27, 2023
Merged
Changes from all commits
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
10 changes: 10 additions & 0 deletions Doc/library/logging.config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:

Expand Down