SysLogHandler: gratuitous data loss

Hello, In logging.handlers, SysLogHandler defaults to localhost:514. http://docs.python.org/py3k/library/logging.handlers.html#logging.handlers.S... http://docs.python.org/library/logging.handlers.html#logging.handlers.SysLog... In practice, there are systems out there that offer local syslog service via additional endpoints, for example: /dev/log /var/run/syslog Some systems even ship with UDP endpoint disabled by default, in which case Python's default is to drop data despite the availability of these other endpoints. The /dev/log path in particular is so commonplace that many system-level utils default to it. Other languages' syslog libraries provide support for it, too. [1] [2] I propose a change to SysLogHandler's default behavior: 1) Try connect(2) against the socket files. 2) Use localhost:514 as a fallback. I believe it's possible to change this interface while remaining backwards-compatible. Thoughts? Jacek [1] http://hackage.haskell.org/packages/archive/hslogger/1.0.7/doc/html/src/Syst... [2] http://golang.org/src/pkg/log/syslog/syslog_unix.go
participants (1)
-
Jacek Masiulaniec