diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2020-01-10 19:37:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-10 19:37:48 (GMT) |
commit | ce54519aa09772f4173b8c17410ed77e403f3ebf (patch) | |
tree | 821b0ad239e560efe4440c0b7a544159ebde4abd | |
parent | abdc634f337ce4943cd7d13587936837aac2ecc9 (diff) | |
download | cpython-ce54519aa09772f4173b8c17410ed77e403f3ebf.zip cpython-ce54519aa09772f4173b8c17410ed77e403f3ebf.tar.gz cpython-ce54519aa09772f4173b8c17410ed77e403f3ebf.tar.bz2 |
bpo-39292: Add missing syslog facility codes. (GH-17945)
-rw-r--r-- | Lib/logging/handlers.py | 49 |
1 files changed, 28 insertions, 21 deletions
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index ea14541..047798f 100644 --- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -742,6 +742,10 @@ class SysLogHandler(logging.Handler): LOG_CRON = 9 # clock daemon LOG_AUTHPRIV = 10 # security/authorization messages (private) LOG_FTP = 11 # FTP daemon + LOG_NTP = 12 # NTP subsystem + LOG_SECURITY = 13 # Log audit + LOG_CONSOLE = 14 # Log alert + LOG_SOLCRON = 15 # Scheduling daemon (Solaris) # other codes through 15 reserved for system use LOG_LOCAL0 = 16 # reserved for local use @@ -769,27 +773,30 @@ class SysLogHandler(logging.Handler): } facility_names = { - "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, - "security": LOG_AUTH, # DEPRECATED - "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, + "auth": LOG_AUTH, + "authpriv": LOG_AUTHPRIV, + "console": LOG_CONSOLE, + "cron": LOG_CRON, + "daemon": LOG_DAEMON, + "ftp": LOG_FTP, + "kern": LOG_KERN, + "lpr": LOG_LPR, + "mail": LOG_MAIL, + "news": LOG_NEWS, + "ntp": LOG_NTP, + "security": LOG_SECURITY, + "solaris-cron": LOG_SOLCRON, + "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, } #The map below appears to be trivially lowercasing the key. However, |