diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-01-09 04:11:44 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-01-09 04:11:44 (GMT) |
commit | 960cf0fd9b2c1e892dfdd5027a6b5020f09ba20f (patch) | |
tree | da7e96648a7bae3ca73d9980234cd08628b9f91f /Doc/library/logging.rst | |
parent | 3563153793623f693b8cd5697cd8a2ae6094d240 (diff) | |
download | cpython-960cf0fd9b2c1e892dfdd5027a6b5020f09ba20f.zip cpython-960cf0fd9b2c1e892dfdd5027a6b5020f09ba20f.tar.gz cpython-960cf0fd9b2c1e892dfdd5027a6b5020f09ba20f.tar.bz2 |
Merged revisions 68167,68276,68292-68293,68344 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68167 | vinay.sajip | 2009-01-02 12:53:04 -0600 (Fri, 02 Jan 2009) | 1 line
Minor documentation changes relating to NullHandler, the module used for handlers and references to ConfigParser.
........
r68276 | tarek.ziade | 2009-01-03 18:04:49 -0600 (Sat, 03 Jan 2009) | 1 line
fixed #1702551: distutils sdist was not pruning VCS directories under win32
........
r68292 | skip.montanaro | 2009-01-04 04:36:58 -0600 (Sun, 04 Jan 2009) | 3 lines
If user configures --without-gcc give preference to $CC instead of blindly
assuming the compiler will be "cc".
........
r68293 | tarek.ziade | 2009-01-04 04:37:52 -0600 (Sun, 04 Jan 2009) | 1 line
using clearer syntax
........
r68344 | marc-andre.lemburg | 2009-01-05 13:43:35 -0600 (Mon, 05 Jan 2009) | 7 lines
Fix #4846 (Py_UNICODE_ISSPACE causes linker error) by moving the declaration
into the extern "C" section.
Add a few more comments and apply some minor edits to make the file contents
fit the original structure again.
........
Diffstat (limited to 'Doc/library/logging.rst')
-rw-r--r-- | Doc/library/logging.rst | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index c0c13fa..232c5b5 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -1608,11 +1608,15 @@ for use by library developers. This method does nothing. + + WatchedFileHandler ^^^^^^^^^^^^^^^^^^ .. module:: logging.handlers +.. module:: logging.handlers + The :class:`WatchedFileHandler` class, located in the :mod:`logging.handlers` module, is a :class:`FileHandler` which watches the file it is logging to. If the file changes, it is closed and reopened using the file name. @@ -2286,7 +2290,7 @@ in :mod:`logging` itself) and defining handlers which are declared either in .. function:: fileConfig(fname[, defaults]) Reads the logging configuration from a :mod:`configparser`\-format file named - *fname*. This function can be called several times from an application, + *fname*. This function can be called several times from an application, allowing an end user the ability 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 @@ -2320,20 +2324,18 @@ in :mod:`logging` itself) and defining handlers which are declared either in Configuration file format ^^^^^^^^^^^^^^^^^^^^^^^^^ -The configuration file format understood by :func:`fileConfig` is -based on :mod:`configparser` functionality. The file must contain -sections called ``[loggers]``, ``[handlers]`` and ``[formatters]`` -which identify by name the entities of each type which are defined in -the file. For each such entity, there is a separate section which -identifies how that entity is configured. Thus, for a logger named -``log01`` in the ``[loggers]`` section, the relevant configuration -details are held in a section ``[logger_log01]``. Similarly, a handler -called ``hand01`` in the ``[handlers]`` section will have its -configuration held in a section called ``[handler_hand01]``, while a -formatter called ``form01`` in the ``[formatters]`` section will have -its configuration specified in a section called -``[formatter_form01]``. The root logger configuration must be -specified in a section called ``[logger_root]``. +The configuration file format understood by :func:`fileConfig` is based on +:mod:`configparser` functionality. The file must contain sections called +``[loggers]``, ``[handlers]`` and ``[formatters]`` which identify by name the +entities of each type which are defined in the file. For each such entity, there +is a separate section which identifies how that entity is configured. Thus, for +a logger named ``log01`` in the ``[loggers]`` section, the relevant +configuration details are held in a section ``[logger_log01]``. Similarly, a +handler called ``hand01`` in the ``[handlers]`` section will have its +configuration held in a section called ``[handler_hand01]``, while a formatter +called ``form01`` in the ``[formatters]`` section will have its configuration +specified in a section called ``[formatter_form01]``. The root logger +configuration must be specified in a section called ``[logger_root]``. Examples of these sections in the file are given below. :: |