mirror of
https://github.com/python/cpython.git
synced 2025-10-02 05:12:23 +00:00
[3.11] [doc] Add some notices to logging configuration documentation. (GH-101373) (GH-101376)
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
This commit is contained in:
parent
fa7c37af49
commit
1016909a6d
1 changed files with 10 additions and 0 deletions
|
@ -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:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue