[Python-checkins] cpython (2.7): Updated documentation on fileConfig().
vinay.sajip
python-checkins at python.org
Tue Apr 19 14:59:00 CEST 2011
http://hg.python.org/cpython/rev/18d29c790bd0
changeset: 69438:18d29c790bd0
branch: 2.7
parent: 69432:84272228d7db
user: Vinay Sajip <vinay_sajip at yahoo.co.uk>
date: Tue Apr 19 13:47:23 2011 +0100
summary:
Updated documentation on fileConfig().
files:
Doc/library/logging.config.rst | 26 ++++++++++++++++-----
1 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/Doc/library/logging.config.rst b/Doc/library/logging.config.rst
--- a/Doc/library/logging.config.rst
+++ b/Doc/library/logging.config.rst
@@ -74,15 +74,29 @@
.. 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)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list