Fix syslog logging on FreeBSD

The UNIX domain socket to use on FreeBSD is /var/run/log.
See syslogd FreeBSD man page: https://www.freebsd.org/cgi/man.cgi?query=syslogd&sektion=8
This commit is contained in:
Victor Bouvier-Deleau 2021-04-02 14:11:50 +02:00
parent c43b50b6e6
commit d2533313bc
No known key found for this signature in database
GPG key ID: 001F0B0390FCE724

View file

@ -151,6 +151,8 @@ def configure_logging(
syslog_path = '/dev/log'
elif os.path.exists('/var/run/syslog'):
syslog_path = '/var/run/syslog'
elif os.path.exists('/var/run/log'):
syslog_path = '/var/run/log'
if syslog_path and not interactive_console():
syslog_handler = logging.handlers.SysLogHandler(address=syslog_path)