[Python-checkins] r68168 - python/branches/py3k/Doc/library/logging.rst
vinay.sajip
python-checkins at python.org
Fri Jan 2 19:53:46 CET 2009
Author: vinay.sajip
Date: Fri Jan 2 19:53:45 2009
New Revision: 68168
Log:
Minor documentation changes relating to NullHandler, the module used for handlers and references to ConfigParser.
Modified:
python/branches/py3k/Doc/library/logging.rst
Modified: python/branches/py3k/Doc/library/logging.rst
==============================================================================
--- python/branches/py3k/Doc/library/logging.rst (original)
+++ python/branches/py3k/Doc/library/logging.rst Fri Jan 2 19:53:45 2009
@@ -1534,8 +1534,6 @@
StreamHandler
^^^^^^^^^^^^^
-.. module:: logging.handlers
-
The :class:`StreamHandler` class, located in the core :mod:`logging` package,
sends logging output to streams such as *sys.stdout*, *sys.stderr* or any
file-like object (or, more precisely, any object which supports :meth:`write`
@@ -1591,9 +1589,30 @@
Outputs the record to the file.
+NullHandler
+^^^^^^^^^^^
+
+.. versionadded:: 3.1
+
+The :class:`NullHandler` class, located in the core :mod:`logging` package,
+does not do any formatting or output. It is essentially a "no-op" handler
+for use by library developers.
+
+
+.. class:: NullHandler()
+
+ Returns a new instance of the :class:`NullHandler` class.
+
+
+ .. method:: emit(record)
+
+ This method does nothing.
+
WatchedFileHandler
^^^^^^^^^^^^^^^^^^
+.. 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.
@@ -2306,7 +2325,7 @@
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
-identified how that entity is configured. Thus, for a logger named
+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
More information about the Python-checkins
mailing list