Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
68e6d57b
Commit
68e6d57b
authored
Jan 28, 2003
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Various minor markup adjustments.
parent
c8d6ef5c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
16 deletions
+25
-16
Doc/lib/liblogging.tex
Doc/lib/liblogging.tex
+25
-16
No files found.
Doc/lib/liblogging.tex
View file @
68e6d57b
...
@@ -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
delegate
s the output functionality from
\class
{
StreamHandler
}
.
It
inherit
s 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,
\co
nstant
{
"a"
}
is used. By default, the
\var
{
mode
}
is not specified,
\co
de
{
'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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment