-
-
Notifications
You must be signed in to change notification settings - Fork 32.9k
Description
Feature or enhancement
Add a handler to the logging package that uses syslog.syslog
to log
Pitch
As mentioned in #91070 the logging.handlers.SysLogHandler
cannot log to the local system log on recent versions of macOS. It is possible to log using syslog.syslog
, I've checked that the code below results in a message in the system log:
syslog.syslog(syslog.LOG_WARNING|syslog.LOG_LOCAL7, "message from python")
Because of this it might be useful to define a LocalSysLogHander
class that logs locally using the syslog
module.
There is a design challenge here though: The syslog module (and libc function) has proces global configuration. This in particular affects the "ident" field which can only be set as proces global configuration. Another challenge is the interaction between the logging package handling of priorities and handling of those in syslog(3)
.
Metadata
Metadata
Assignees
Labels
Projects
Status