mirror of
https://github.com/python/cpython.git
synced 2025-10-01 12:52:18 +00:00
correct syslog.openlog() argument name to logoption; thanks to Arnaud Gomes-do-Vale from docs@
This commit is contained in:
parent
b40827d379
commit
55ae12b019
1 changed files with 3 additions and 3 deletions
|
@ -30,7 +30,7 @@ The module defines the following functions:
|
||||||
``openlog()`` will be called with no arguments.
|
``openlog()`` will be called with no arguments.
|
||||||
|
|
||||||
|
|
||||||
.. function:: openlog([ident[, logopt[, facility]]])
|
.. function:: openlog([ident[, logoption[, facility]]])
|
||||||
|
|
||||||
Logging options of subsequent :func:`syslog` calls can be set by calling
|
Logging options of subsequent :func:`syslog` calls can be set by calling
|
||||||
:func:`openlog`. :func:`syslog` will call :func:`openlog` with no arguments
|
:func:`openlog`. :func:`syslog` will call :func:`openlog` with no arguments
|
||||||
|
@ -38,7 +38,7 @@ The module defines the following functions:
|
||||||
|
|
||||||
The optional *ident* keyword argument is a string which is prepended to every
|
The optional *ident* keyword argument is a string which is prepended to every
|
||||||
message, and defaults to ``sys.argv[0]`` with leading path components
|
message, and defaults to ``sys.argv[0]`` with leading path components
|
||||||
stripped. The optional *logopt* keyword argument (default is 0) is a bit
|
stripped. The optional *logoption* keyword argument (default is 0) is a bit
|
||||||
field -- see below for possible values to combine. The optional *facility*
|
field -- see below for possible values to combine. The optional *facility*
|
||||||
keyword argument (default is :const:`LOG_USER`) sets the default facility for
|
keyword argument (default is :const:`LOG_USER`) sets the default facility for
|
||||||
messages which do not have a facility explicitly encoded.
|
messages which do not have a facility explicitly encoded.
|
||||||
|
@ -98,5 +98,5 @@ An example of setting some log options, these would include the process ID in
|
||||||
logged messages, and write the messages to the destination facility used for
|
logged messages, and write the messages to the destination facility used for
|
||||||
mail logging::
|
mail logging::
|
||||||
|
|
||||||
syslog.openlog(logopt=syslog.LOG_PID, facility=syslog.LOG_MAIL)
|
syslog.openlog(logoption=syslog.LOG_PID, facility=syslog.LOG_MAIL)
|
||||||
syslog.syslog('E-mail processing initiated...')
|
syslog.syslog('E-mail processing initiated...')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue