summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2009-01-10 19:23:34 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2009-01-10 19:23:34 (GMT)
commit30bf122841669591b9368bcf1ed079729eb837b3 (patch)
tree8f63aa561395aac6966a0ef3d1a8b7d54a996f14 /Doc
parent44e3bb6a008f28c017fab14f5a154dfde7fd5fe8 (diff)
downloadcpython-30bf122841669591b9368bcf1ed079729eb837b3.zip
cpython-30bf122841669591b9368bcf1ed079729eb837b3.tar.gz
cpython-30bf122841669591b9368bcf1ed079729eb837b3.tar.bz2
Corrected minor typo and added .currentmodule directives to fix missing cross-references.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/logging.rst14
1 files changed, 11 insertions, 3 deletions
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst
index 42b1a05..84500c4 100644
--- a/Doc/library/logging.rst
+++ b/Doc/library/logging.rst
@@ -119,7 +119,7 @@ Another useful feature of the logging API is the ability to produce different
messages at different log levels. This allows you to instrument your code with
debug messages, for example, but turning the log level down so that those debug
messages are not written for your production system. The default levels are
-``CRITICAL``, ``ERROR``, ``WARNING``, ``INFO``, ``DEBUG`` and ``UNSET``.
+``CRITICAL``, ``ERROR``, ``WARNING``, ``INFO``, ``DEBUG`` and ``NOTSET``.
The logger, handler, and log message call each specify a level. The log message
is only emitted if the handler and logger are configured to emit messages of
@@ -421,6 +421,7 @@ code approach, mainly separation of configuration and code and the ability of
noncoders to easily modify the logging properties.
.. _library-config:
+
Configuring Logging for a Library
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -529,6 +530,8 @@ provided:
#. :class:`FileHandler` instances send error messages to disk files.
+.. currentmodule:: logging.handlers
+
#. :class:`BaseRotatingHandler` is the base class for handlers that rotate log
files at a certain point. It is not meant to be instantiated directly. Instead,
use :class:`RotatingFileHandler` or :class:`TimedRotatingFileHandler`.
@@ -558,6 +561,13 @@ provided:
#. :class:`HTTPHandler` instances send error messages to an HTTP server using
either ``GET`` or ``POST`` semantics.
+#. :class:`WatchedFileHandler` instances watch the file they are logging to. If
+the file changes, it is closed and reopened using the file name. This handler
+is only useful on Unix-like systems; Windows does not support the underlying
+mechanism used.
+
+.. currentmodule:: logging
+
#. :class:`NullHandler` instances do nothing with error messages. They are used
by library developers who want to use logging, but want to avoid the "No
handlers could be found for logger XXX" message which can be displayed if
@@ -1618,8 +1628,6 @@ 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.