diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-04-19 12:47:23 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-04-19 12:47:23 (GMT) |
commit | 0513275b58e1a99b028f7e2317e5faa4984fde0d (patch) | |
tree | e5eb349cde4fdde304426a13b179cd8b9c8c5a35 /Doc/library | |
parent | bafc6a9fca08922e1d6593f22d989b3a72bdc4f8 (diff) | |
download | cpython-0513275b58e1a99b028f7e2317e5faa4984fde0d.zip cpython-0513275b58e1a99b028f7e2317e5faa4984fde0d.tar.gz cpython-0513275b58e1a99b028f7e2317e5faa4984fde0d.tar.bz2 |
Updated documentation on fileConfig().
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/logging.config.rst | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/Doc/library/logging.config.rst b/Doc/library/logging.config.rst index 2412dde..500c736 100644 --- a/Doc/library/logging.config.rst +++ b/Doc/library/logging.config.rst @@ -74,15 +74,29 @@ in :mod:`logging` itself) and defining handlers which are declared either in .. 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 - *fname*. This function can be called several times from an application, - allowing an end user to select from various pre-canned + Reads the logging configuration from a :mod:`configparser`\-format file + named *fname*. This function can be called several times from an + application, allowing an end user to select from various pre-canned configurations (if the developer provides a mechanism to present the choices - and load the chosen configuration). Defaults to be passed to the ConfigParser - can be specified in the *defaults* argument. - + and load the chosen configuration). + + :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) |