mirror of
https://github.com/python/cpython.git
synced 2025-09-29 11:45:57 +00:00
Updated documentation on fileConfig().
This commit is contained in:
parent
bafc6a9fca
commit
0513275b58
1 changed files with 20 additions and 6 deletions
|
@ -74,15 +74,29 @@ in :mod:`logging` itself) and defining handlers which are declared either in
|
||||||
|
|
||||||
.. versionadded:: 2.7
|
.. versionadded:: 2.7
|
||||||
|
|
||||||
.. function:: fileConfig(fname[, defaults])
|
.. function:: fileConfig(fname, defaults=None, disable_existing_loggers=True)
|
||||||
|
|
||||||
Reads the logging configuration from a :mod:`configparser`\-format file named
|
Reads the logging configuration from a :mod:`configparser`\-format file
|
||||||
*fname*. This function can be called several times from an application,
|
named *fname*. This function can be called several times from an
|
||||||
allowing an end user to select from various pre-canned
|
application, allowing an end user to select from various pre-canned
|
||||||
configurations (if the developer provides a mechanism to present the choices
|
configurations (if the developer provides a mechanism to present the choices
|
||||||
and load the chosen configuration). Defaults to be passed to the ConfigParser
|
and load the chosen configuration).
|
||||||
can be specified in the *defaults* argument.
|
|
||||||
|
|
||||||
|
:param defaults: Defaults to be passed to the ConfigParser can be specified
|
||||||
|
in this argument.
|
||||||
|
|
||||||
|
:param disable_existing_loggers: If specified as ``False``, loggers which
|
||||||
|
exist when this call is made are left
|
||||||
|
alone. The default is ``True`` because this
|
||||||
|
enables old behaviour in a backward-
|
||||||
|
compatible way. This behaviour is to
|
||||||
|
disable any existing loggers unless they or
|
||||||
|
their ancestors are explicitly named in the
|
||||||
|
logging configuration.
|
||||||
|
|
||||||
|
.. versionchanged:: 2.6
|
||||||
|
The ``disable_existing_loggers`` keyword argument was added. Previously,
|
||||||
|
existing loggers were *always* disabled.
|
||||||
|
|
||||||
.. function:: listen(port=DEFAULT_LOGGING_CONFIG_PORT)
|
.. function:: listen(port=DEFAULT_LOGGING_CONFIG_PORT)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue