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
fbe34fab
Commit
fbe34fab
authored
Oct 09, 1995
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
syslog docs by steve clift
parent
0447a32b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
136 additions
and
0 deletions
+136
-0
Doc/lib.tex
Doc/lib.tex
+1
-0
Doc/lib/lib.tex
Doc/lib/lib.tex
+1
-0
Doc/lib/libsyslog.tex
Doc/lib/libsyslog.tex
+67
-0
Doc/libsyslog.tex
Doc/libsyslog.tex
+67
-0
No files found.
Doc/lib.tex
View file @
fbe34fab
...
...
@@ -120,6 +120,7 @@ to Python and how to embed it in other applications.
\input
{
libtermios
}
\input
{
libfcntl
}
\input
{
libposixfile
}
\input
{
libsyslog
}
\input
{
libpdb
}
% The Python Debugger
...
...
Doc/lib/lib.tex
View file @
fbe34fab
...
...
@@ -120,6 +120,7 @@ to Python and how to embed it in other applications.
\input
{
libtermios
}
\input
{
libfcntl
}
\input
{
libposixfile
}
\input
{
libsyslog
}
\input
{
libpdb
}
% The Python Debugger
...
...
Doc/lib/libsyslog.tex
0 → 100644
View file @
fbe34fab
\section
{
Built-in Module
\sectcode
{
syslog
}}
\bimodindex
{
syslog
}
This module provides an interface to the Unix
\code
{
syslog
}
library
routines. Refer to the
\UNIX
{}
manual pages for a detailed description
of the
\code
{
syslog
}
facility.
The module defines the following functions:
\begin{funcdesc}
{
syslog
}{
\optional
{
priority
\,
}
message
}
Send the string
\var
{
message
}
to the system logger.
A trailing newline is added if necessary.
Each message is tagged with a priority composed of a
\var
{
facility
}
and
a
\var
{
level
}
.
The optional
\var
{
priority
}
argument, which defaults to
\code
{
(LOG
_
USER | LOG
_
INFO)
}
, determines the message priority.
\end{funcdesc}
\begin{funcdesc}
{
openlog
}{
ident
\,
\optional
{
logopt
\,
\optional
{
facility
}}}
Logging options other than the defaults can be set by explicitly opening
the log file with
\code
{
openlog()
}
prior to calling
\code
{
syslog()
}
.
The defaults are (usually)
\var
{
ident
}
=
\samp
{
syslog
}
,
\var
{
logopt
}
= 0,
\var
{
facility
}
=
\code
{
LOG
_
USER
}
.
The
\var
{
ident
}
argument is a string which is prepended to every message.
The optional
\var
{
logopt
}
argument is a bit field - see below for possible
values to combine.
The optional
\var
{
facility
}
argument sets the default facility for messages
which do not have a facility explicitly encoded.
\end{funcdesc}
\begin{funcdesc}
{
closelog
}{}
Close the log file.
\end{funcdesc}
\begin{funcdesc}
{
setlogmask
}{
maskpri
}
This function set the priority mask to
\var
{
maskpri
}
and returns the
previous mask value.
Calls to
\code
{
syslog
}
with a priority level not set in
\var
{
maskpri
}
are ignored.
The default is to log all priorities.
The function
\code
{
LOG
_
MASK(
\var
{
pri
}
)
}
calculates the mask for the
individual priority
\var
{
pri
}
.
The function
\code
{
LOG
_
UPTO(
\var
{
pri
}
)
}
calculates the mask for all priorities
up to and including
\var
{
pri
}
.
\end{funcdesc}
The module defines the following constants:
\begin{description}
\item
[Priority levels (high to low):]
\code
{
LOG
_
EMERG
}
,
\code
{
LOG
_
ALERT
}
,
\code
{
LOG
_
CRIT
}
,
\code
{
LOG
_
ERR
}
,
\code
{
LOG
_
WARNING
}
,
\code
{
LOG
_
NOTICE
}
,
\code
{
LOG
_
INFO
}
,
\code
{
LOG
_
DEBUG
}
.
\item
[Facilities:]
\code
{
LOG
_
KERN
}
,
\code
{
LOG
_
USER
}
,
\code
{
LOG
_
MAIL
}
,
\code
{
LOG
_
DAEMON
}
,
\code
{
LOG
_
AUTH
}
,
\code
{
LOG
_
LPR
}
,
\code
{
LOG
_
NEWS
}
,
\code
{
LOG
_
UUCP
}
,
\code
{
LOG
_
CRON
}
and
\code
{
LOG
_
LOCAL0
}
to
\code
{
LOG
_
LOCAL7
}
.
\item
[Log options:]
\code
{
LOG
_
PID
}
,
\code
{
LOG
_
CONS
}
,
\code
{
LOG
_
NDELAY
}
,
\code
{
LOG
_
NOWAIT
}
and
\code
{
LOG
_
PERROR
}
if defined in
\file
{
syslog.h
}
.
\end{description}
Doc/libsyslog.tex
0 → 100644
View file @
fbe34fab
\section
{
Built-in Module
\sectcode
{
syslog
}}
\bimodindex
{
syslog
}
This module provides an interface to the Unix
\code
{
syslog
}
library
routines. Refer to the
\UNIX
{}
manual pages for a detailed description
of the
\code
{
syslog
}
facility.
The module defines the following functions:
\begin{funcdesc}
{
syslog
}{
\optional
{
priority
\,
}
message
}
Send the string
\var
{
message
}
to the system logger.
A trailing newline is added if necessary.
Each message is tagged with a priority composed of a
\var
{
facility
}
and
a
\var
{
level
}
.
The optional
\var
{
priority
}
argument, which defaults to
\code
{
(LOG
_
USER | LOG
_
INFO)
}
, determines the message priority.
\end{funcdesc}
\begin{funcdesc}
{
openlog
}{
ident
\,
\optional
{
logopt
\,
\optional
{
facility
}}}
Logging options other than the defaults can be set by explicitly opening
the log file with
\code
{
openlog()
}
prior to calling
\code
{
syslog()
}
.
The defaults are (usually)
\var
{
ident
}
=
\samp
{
syslog
}
,
\var
{
logopt
}
= 0,
\var
{
facility
}
=
\code
{
LOG
_
USER
}
.
The
\var
{
ident
}
argument is a string which is prepended to every message.
The optional
\var
{
logopt
}
argument is a bit field - see below for possible
values to combine.
The optional
\var
{
facility
}
argument sets the default facility for messages
which do not have a facility explicitly encoded.
\end{funcdesc}
\begin{funcdesc}
{
closelog
}{}
Close the log file.
\end{funcdesc}
\begin{funcdesc}
{
setlogmask
}{
maskpri
}
This function set the priority mask to
\var
{
maskpri
}
and returns the
previous mask value.
Calls to
\code
{
syslog
}
with a priority level not set in
\var
{
maskpri
}
are ignored.
The default is to log all priorities.
The function
\code
{
LOG
_
MASK(
\var
{
pri
}
)
}
calculates the mask for the
individual priority
\var
{
pri
}
.
The function
\code
{
LOG
_
UPTO(
\var
{
pri
}
)
}
calculates the mask for all priorities
up to and including
\var
{
pri
}
.
\end{funcdesc}
The module defines the following constants:
\begin{description}
\item
[Priority levels (high to low):]
\code
{
LOG
_
EMERG
}
,
\code
{
LOG
_
ALERT
}
,
\code
{
LOG
_
CRIT
}
,
\code
{
LOG
_
ERR
}
,
\code
{
LOG
_
WARNING
}
,
\code
{
LOG
_
NOTICE
}
,
\code
{
LOG
_
INFO
}
,
\code
{
LOG
_
DEBUG
}
.
\item
[Facilities:]
\code
{
LOG
_
KERN
}
,
\code
{
LOG
_
USER
}
,
\code
{
LOG
_
MAIL
}
,
\code
{
LOG
_
DAEMON
}
,
\code
{
LOG
_
AUTH
}
,
\code
{
LOG
_
LPR
}
,
\code
{
LOG
_
NEWS
}
,
\code
{
LOG
_
UUCP
}
,
\code
{
LOG
_
CRON
}
and
\code
{
LOG
_
LOCAL0
}
to
\code
{
LOG
_
LOCAL7
}
.
\item
[Log options:]
\code
{
LOG
_
PID
}
,
\code
{
LOG
_
CONS
}
,
\code
{
LOG
_
NDELAY
}
,
\code
{
LOG
_
NOWAIT
}
and
\code
{
LOG
_
PERROR
}
if defined in
\file
{
syslog.h
}
.
\end{description}
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