syslog.openlog()

syslog.openlog([ident[, logoption[, facility]]])

Logging options of subsequent syslog() calls can be set by calling openlog(). syslog() will call openlog() with no arguments if the log is not currently open.

The optional ident keyword argument is a string which is prepended to every message, and defaults to sys.argv[0] with leading path components stripped. The optional logoption keyword argument (default is 0) is a bit field – see below for possible values to combine. The optional facility keyword argument (default is LOG_USER) sets the default facility for messages which do not have a facility explicitly encoded.

Changed in version 3.2: In previous versions, keyword arguments were not allowed, and ident was required. The default for ident was dependent on the system libraries, and often was python instead of the name of the python program file.

doc_python
2016-10-07 17:44:04
Comments
Leave a Comment

Please login to continue.