[Python-checkins] r75754 - in python/branches/release26-maint: Doc/library/logging.rst
georg.brandl
python-checkins at python.org
Tue Oct 27 14:14:29 CET 2009
Author: georg.brandl
Date: Tue Oct 27 14:14:28 2009
New Revision: 75754
Log:
Merged revisions 68623-68624 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68623 | vinay.sajip | 2009-01-15 23:48:13 +0100 (Do, 15 Jan 2009) | 1 line
Made minor changes/corrections in markup. Added a couple of section headings.
........
r68624 | vinay.sajip | 2009-01-16 00:04:47 +0100 (Fr, 16 Jan 2009) | 1 line
Minor changes/corrections in markup.
........
Modified:
python/branches/release26-maint/ (props changed)
python/branches/release26-maint/Doc/library/logging.rst
Modified: python/branches/release26-maint/Doc/library/logging.rst
==============================================================================
--- python/branches/release26-maint/Doc/library/logging.rst (original)
+++ python/branches/release26-maint/Doc/library/logging.rst Tue Oct 27 14:14:28 2009
@@ -518,6 +518,9 @@
the message to its destination. Most user-defined subclasses of :class:`Handler`
will need to override this :meth:`emit`.
+Useful Handlers
+---------------
+
In addition to the base :class:`Handler` class, many useful subclasses are
provided:
@@ -526,40 +529,44 @@
#. :class:`FileHandler` instances send error messages to disk files.
-#. :class:`handlers.BaseRotatingHandler` is the base class for handlers that
+.. module:: 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`.
-#. :class:`handlers.RotatingFileHandler` instances send error messages to disk files,
- with support for maximum log file sizes and log file rotation.
+#. :class:`RotatingFileHandler` instances send error messages to disk
+ files, with support for maximum log file sizes and log file rotation.
-#. :class:`handlers.TimedRotatingFileHandler` instances send error messages to disk files
- rotating the log file at certain timed intervals.
+#. :class:`TimedRotatingFileHandler` instances send error messages to
+ disk files, rotating the log file at certain timed intervals.
-#. :class:`handlers.SocketHandler` instances send error messages to TCP/IP sockets.
+#. :class:`SocketHandler` instances send error messages to TCP/IP
+ sockets.
-#. :class:`handlers.DatagramHandler` instances send error messages to UDP sockets.
+#. :class:`DatagramHandler` instances send error messages to UDP
+ sockets.
-#. :class:`handlers.SMTPHandler` instances send error messages to a designated email
- address.
+#. :class:`SMTPHandler` instances send error messages to a designated
+ email address.
-#. :class:`handlers.SysLogHandler` instances send error messages to a Unix syslog daemon,
- possibly on a remote machine.
+#. :class:`SysLogHandler` instances send error messages to a Unix
+ syslog daemon, possibly on a remote machine.
-#. :class:`handlers.NTEventLogHandler` instances send error messages to a Windows
- NT/2000/XP event log.
+#. :class:`NTEventLogHandler` instances send error messages to a
+ Windows NT/2000/XP event log.
-#. :class:`handlers.MemoryHandler` instances send error messages to a buffer in memory,
- which is flushed whenever specific criteria are met.
+#. :class:`MemoryHandler` instances send error messages to a buffer
+ in memory, which is flushed whenever specific criteria are met.
-#. :class:`handlers.HTTPHandler` instances send error messages to an HTTP server using
- either ``GET`` or ``POST`` semantics.
+#. :class:`HTTPHandler` instances send error messages to an HTTP
+ server using either ``GET`` or ``POST`` semantics.
-#. :class:`handlers.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.
+#. :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.
The :class:`StreamHandler` and :class:`FileHandler`
classes are defined in the core logging package. The other handlers are
@@ -586,6 +593,9 @@
name. If this feature is used, messages sent to the named logger and its
children are allowed through the filter, and all others dropped.
+Module-Level Functions
+----------------------
+
In addition to the classes described above, there are a number of module- level
functions.
More information about the Python-checkins
mailing list