logging.handlers.SysLogHandler.encodePriority()

encodePriority(facility, priority)

Encodes the facility and priority into an integer. You can pass in strings or integers - if strings are passed, internal mapping dictionaries are used to convert them to integers.

The symbolic LOG_ values are defined in SysLogHandler and mirror the values defined in the sys/syslog.h header file.

Priorities

Name (string) Symbolic value
alert LOG_ALERT
crit or critical LOG_CRIT
debug LOG_DEBUG
emerg or panic LOG_EMERG
err or error LOG_ERR
info LOG_INFO
notice LOG_NOTICE
warn or warning LOG_WARNING

Facilities

Name (string) Symbolic value
auth LOG_AUTH
authpriv LOG_AUTHPRIV
cron LOG_CRON
daemon LOG_DAEMON
ftp LOG_FTP
kern LOG_KERN
lpr LOG_LPR
mail LOG_MAIL
news LOG_NEWS
syslog LOG_SYSLOG
user LOG_USER
uucp LOG_UUCP
local0 LOG_LOCAL0
local1 LOG_LOCAL1
local2 LOG_LOCAL2
local3 LOG_LOCAL3
local4 LOG_LOCAL4
local5 LOG_LOCAL5
local6 LOG_LOCAL6
local7 LOG_LOCAL7
doc_python
2016-10-07 17:36:18
Comments
Leave a Comment

Please login to continue.