[Python-checkins] cpython (2.7): Issue #23536: Clarified scope of fileConfig()'s API.

vinay.sajip python-checkins at python.org
Sat Apr 18 14:16:21 CEST 2015


https://hg.python.org/cpython/rev/df28044b7e14
changeset: 95705:df28044b7e14
branch: 2.7
parent: 95688:867c509c8c5e
user: Vinay Sajip <vinay_sajip at yahoo.co.uk>
date: Sat Apr 18 13:05:19 2015 +0100
summary:
 Issue #23536: Clarified scope of fileConfig()'s API.
files:
 Doc/library/logging.config.rst | 12 ++++++++++++
 1 files changed, 12 insertions(+), 0 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
@@ -580,6 +580,18 @@
 specified in a section called ``[formatter_form01]``. The root logger
 configuration must be specified in a section called ``[logger_root]``.
 
+.. note::
+
+ The :func:`fileConfig` API is older than the :func:`dictConfig` API and does
+ not provide functionality to cover certain aspects of logging. For example,
+ you cannot configure :class:`~logging.Filter` objects, which provide for
+ filtering of messages beyond simple integer levels, using :func:`fileConfig`.
+ If you need to have instances of :class:`~logging.Filter` in your logging
+ configuration, you will need to use :func:`dictConfig`. Note that future
+ enhancements to configuration functionality will be added to
+ :func:`dictConfig`, so it's worth considering transitioning to this newer
+ API when it's convenient to do so.
+
 Examples of these sections in the file are given below. ::
 
 [loggers]
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /