Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
06245ac2
Kaydet (Commit)
06245ac2
authored
Nis 29, 1998
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix documentation based on comments from Sean Reifschneider
<jafo-9804@tummy.com>. Logical markup.
üst
7e6d18c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
60 deletions
+64
-60
libsyslog.tex
Doc/lib/libsyslog.tex
+32
-30
libsyslog.tex
Doc/libsyslog.tex
+32
-30
No files found.
Doc/lib/libsyslog.tex
Dosyayı görüntüle @
06245ac2
...
...
@@ -10,24 +10,25 @@ 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.
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
\constant
{
LOG
_
INFO
}
,
determines the message priority. If the facility is not encoded in
\var
{
priority
}
using logical-or (
\code
{
LOG
_
INFO | LOG
_
USER
}
), the
value given in the
\function
{
openlog()
}
call is used.
\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.
Logging options other than the defaults can be set by explicitly
opening the log file with
\function
{
openlog()
}
prior to calling
\function
{
syslog()
}
. The defaults are (usually)
\var
{
ident
}
=
\
code
{
'syslog'
}
,
\var
{
logopt
}
=
\code
{
0
}
,
\var
{
facility
}
=
\constant
{
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
}{}
...
...
@@ -36,14 +37,12 @@ Close the log file.
\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
}
.
previous mask value. Calls to
\function
{
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:
...
...
@@ -52,18 +51,21 @@ The module defines the following constants:
\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
}
.
\constant
{
LOG
_
EMERG
}
,
\constant
{
LOG
_
ALERT
}
,
\constant
{
LOG
_
CRIT
}
,
\constant
{
LOG
_
ERR
}
,
\constant
{
LOG
_
WARNING
}
,
\constant
{
LOG
_
NOTICE
}
,
\constant
{
LOG
_
INFO
}
,
\constant
{
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
}
.
\constant
{
LOG
_
KERN
}
,
\constant
{
LOG
_
USER
}
,
\constant
{
LOG
_
MAIL
}
,
\constant
{
LOG
_
DAEMON
}
,
\constant
{
LOG
_
AUTH
}
,
\constant
{
LOG
_
LPR
}
,
\constant
{
LOG
_
NEWS
}
,
\constant
{
LOG
_
UUCP
}
,
\constant
{
LOG
_
CRON
}
and
\constant
{
LOG
_
LOCAL0
}
to
\constant
{
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
}
.
\constant
{
LOG
_
PID
}
,
\constant
{
LOG
_
CONS
}
,
\constant
{
LOG
_
NDELAY
}
,
\constant
{
LOG
_
NOWAIT
}
and
\constant
{
LOG
_
PERROR
}
if defined in
\code
{
<syslog.h>
}
.
\end{description}
Doc/libsyslog.tex
Dosyayı görüntüle @
06245ac2
...
...
@@ -10,24 +10,25 @@ 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.
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
\constant
{
LOG
_
INFO
}
,
determines the message priority. If the facility is not encoded in
\var
{
priority
}
using logical-or (
\code
{
LOG
_
INFO | LOG
_
USER
}
), the
value given in the
\function
{
openlog()
}
call is used.
\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.
Logging options other than the defaults can be set by explicitly
opening the log file with
\function
{
openlog()
}
prior to calling
\function
{
syslog()
}
. The defaults are (usually)
\var
{
ident
}
=
\
code
{
'syslog'
}
,
\var
{
logopt
}
=
\code
{
0
}
,
\var
{
facility
}
=
\constant
{
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
}{}
...
...
@@ -36,14 +37,12 @@ Close the log file.
\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
}
.
previous mask value. Calls to
\function
{
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:
...
...
@@ -52,18 +51,21 @@ The module defines the following constants:
\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
}
.
\constant
{
LOG
_
EMERG
}
,
\constant
{
LOG
_
ALERT
}
,
\constant
{
LOG
_
CRIT
}
,
\constant
{
LOG
_
ERR
}
,
\constant
{
LOG
_
WARNING
}
,
\constant
{
LOG
_
NOTICE
}
,
\constant
{
LOG
_
INFO
}
,
\constant
{
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
}
.
\constant
{
LOG
_
KERN
}
,
\constant
{
LOG
_
USER
}
,
\constant
{
LOG
_
MAIL
}
,
\constant
{
LOG
_
DAEMON
}
,
\constant
{
LOG
_
AUTH
}
,
\constant
{
LOG
_
LPR
}
,
\constant
{
LOG
_
NEWS
}
,
\constant
{
LOG
_
UUCP
}
,
\constant
{
LOG
_
CRON
}
and
\constant
{
LOG
_
LOCAL0
}
to
\constant
{
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
}
.
\constant
{
LOG
_
PID
}
,
\constant
{
LOG
_
CONS
}
,
\constant
{
LOG
_
NDELAY
}
,
\constant
{
LOG
_
NOWAIT
}
and
\constant
{
LOG
_
PERROR
}
if defined in
\code
{
<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