Commit 68e6d57b authored by Fred Drake's avatar Fred Drake

Various minor markup adjustments.

parent c8d6ef5c
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
\moduleauthor{Vinay Sajip}{vinay_sajip@red-dove.com} \moduleauthor{Vinay Sajip}{vinay_sajip@red-dove.com}
\sectionauthor{Vinay Sajip}{vinay_sajip@red-dove.com} \sectionauthor{Vinay Sajip}{vinay_sajip@red-dove.com}
\modulesynopsis{Logging module for Python based on PEP 282.} \modulesynopsis{Logging module for Python based on \pep{282}.}
\indexii{Errors}{logging} \indexii{Errors}{logging}
...@@ -90,7 +90,7 @@ sockets. ...@@ -90,7 +90,7 @@ sockets.
designated email address. designated email address.
\item \class{SysLogHandler} instances send error messages to a \item \class{SysLogHandler} instances send error messages to a
Unix syslog, possibly on a remote machine. \UNIX{} syslog daemon, possibly on a remote machine.
\item \class{NTEventLogHandler} instances send error messages to a \item \class{NTEventLogHandler} instances send error messages to a
Windows NT/2000/XP event log. Windows NT/2000/XP event log.
...@@ -100,7 +100,7 @@ buffer in memory, which is flushed whenever specific criteria are ...@@ -100,7 +100,7 @@ buffer in memory, which is flushed whenever specific criteria are
met. met.
\item \class{HTTPHandler} instances send error messages to an \item \class{HTTPHandler} instances send error messages to an
HTTP server using either GET or POST semantics. HTTP server using either \samp{GET} or \samp{POST} semantics.
\end{enumerate} \end{enumerate}
...@@ -227,6 +227,14 @@ loggers are instantiated by applications which need to use custom logger ...@@ -227,6 +227,14 @@ loggers are instantiated by applications which need to use custom logger
behavior. behavior.
\end{funcdesc} \end{funcdesc}
\begin{seealso}
\seepep{282}{A Logging System}
{The proposal which described this feature for inclusion in
the Python standard library.}
\end{seealso}
\subsection{Logger Objects} \subsection{Logger Objects}
Loggers have the following attributes and methods. Note that Loggers are Loggers have the following attributes and methods. Note that Loggers are
...@@ -342,10 +350,10 @@ specialized \class{LogRecord} instances. ...@@ -342,10 +350,10 @@ specialized \class{LogRecord} instances.
\subsection{Handler Objects} \subsection{Handler Objects}
Handlers have the following attributes and methods. Note that a Handler is Handlers have the following attributes and methods. Note that
never instantiated directly; this class acts as a base for more useful \class{Handler} is never instantiated directly; this class acts as a
subclasses. However, the \method{__init__()} in subclasses needs to call base for more useful subclasses. However, the \method{__init__()}
\method{Handler.__init__()}. method in subclasses needs to call \method{Handler.__init__()}.
\begin{methoddesc}{__init__}{level=\constant{ALL}} \begin{methoddesc}{__init__}{level=\constant{ALL}}
Initializes the \class{Handler} instance by setting its level, setting Initializes the \class{Handler} instance by setting its level, setting
...@@ -457,7 +465,7 @@ at times. ...@@ -457,7 +465,7 @@ at times.
\subsubsection{FileHandler} \subsubsection{FileHandler}
The \class{FileHandler} class sends logging output to a disk file. The \class{FileHandler} class sends logging output to a disk file.
It delegates the output functionality from \class{StreamHandler}. It inherits the output functionality from \class{StreamHandler}.
\begin{classdesc}{FileHandler}{filename\optional{, mode}} \begin{classdesc}{FileHandler}{filename\optional{, mode}}
Returns a new instance of the \class{FileHandler} class. The specified Returns a new instance of the \class{FileHandler} class. The specified
...@@ -482,7 +490,7 @@ The \class{RotatingFileHandler} class supports rotation of disk log files. ...@@ -482,7 +490,7 @@ The \class{RotatingFileHandler} class supports rotation of disk log files.
backupCount}} backupCount}}
Returns a new instance of the \class{RotatingFileHandler} class. The Returns a new instance of the \class{RotatingFileHandler} class. The
specified file is opened and used as the stream for logging. If specified file is opened and used as the stream for logging. If
\var{mode} is not specified, \constant{"a"} is used. By default, the \var{mode} is not specified, \code{'a'} is used. By default, the
file grows indefinitely. You can use the \var{maxBytes} and file grows indefinitely. You can use the \var{maxBytes} and
\var{backupCount} values to allow the file to \dfn{rollover} at a \var{backupCount} values to allow the file to \dfn{rollover} at a
predetermined size. When the size is about to be exceeded, the file is predetermined size. When the size is about to be exceeded, the file is
...@@ -582,14 +590,15 @@ partial sends which can happen when the network is busy. ...@@ -582,14 +590,15 @@ partial sends which can happen when the network is busy.
\subsubsection{SysLogHandler} \subsubsection{SysLogHandler}
The \class{SysLogHandler} class supports sending logging messages to a The \class{SysLogHandler} class supports sending logging messages to a
remote or local Unix syslog. remote or local \UNIX{} syslog.
\begin{classdesc}{SysLogHandler}{\optional{address\optional{, facility}}} \begin{classdesc}{SysLogHandler}{\optional{address\optional{, facility}}}
Returns a new instance of the \class{SysLogHandler} class intended to Returns a new instance of the \class{SysLogHandler} class intended to
communicate with a remote Unix machine whose address is given by communicate with a remote \UNIX{} machine whose address is given by
\var{address} in the form of a (host, port) tuple. If \var{address} is not \var{address} in the form of a \code{(\var{host}, \var{port})}
specified, ('localhost', 514) is used. The address is used to open a UDP tuple. If \var{address} is not specified, \code{('localhost', 514)} is
socket. If \var{facility} is not specified, \constant{LOG_USER} is used. used. The address is used to open a UDP socket. If \var{facility} is
not specified, \constant{LOG_USER} is used.
\end{classdesc} \end{classdesc}
\begin{methoddesc}{close}{} \begin{methoddesc}{close}{}
...@@ -757,12 +766,12 @@ Checks for buffer full or a record at the \var{flushLevel} or higher. ...@@ -757,12 +766,12 @@ Checks for buffer full or a record at the \var{flushLevel} or higher.
\subsubsection{HTTPHandler} \subsubsection{HTTPHandler}
The \class{HTTPHandler} class supports sending logging messages to a The \class{HTTPHandler} class supports sending logging messages to a
Web server, using either GET or POST semantics. Web server, using either \samp{GET} or \samp{POST} semantics.
\begin{classdesc}{HTTPHandler}{host, url\optional{, method}} \begin{classdesc}{HTTPHandler}{host, url\optional{, method}}
Returns a new instance of the \class{HTTPHandler} class. The Returns a new instance of the \class{HTTPHandler} class. The
instance is initialized with a host address, url and HTTP method. instance is initialized with a host address, url and HTTP method.
If no \var{method} is specified, GET is used. If no \var{method} is specified, \samp{GET} is used.
\end{classdesc} \end{classdesc}
\begin{methoddesc}{emit}{record} \begin{methoddesc}{emit}{record}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment