From 2bf8164a908b51c13d4709e63e7cb2905b5548c7 Mon Sep 17 00:00:00 2001 From: John Stanford Date: Thu, 26 Feb 2015 12:47:16 -0800 Subject: Make use_syslog=True log to syslog via /dev/log After upgrade from Icehouse to Juno OpenStack services don't log to syslog via /dev/log anymore. This behaviour was introduced in commit 1188d88a73e75da5c143d0dfad34e10dad0daee0. While /dev/log is arguably not a very portable default, breaking the backwards compatibility is even worse. This commit restores the original behaviour. /dev/log portability issues will be addressed separately. Closes-Bug: #1385295 Related-Bug: #1391428 Change-Id: I5c450595fde7451a5bf9372430a53e75dd5773a3 --- oslo_log/log.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/oslo_log/log.py b/oslo_log/log.py index 90e5762..bb0c330 100644 --- a/oslo_log/log.py +++ b/oslo_log/log.py @@ -285,9 +285,11 @@ def _setup_logging_from_conf(conf, project, version): # TODO(bogdando) use the format provided by RFCSysLogHandler # after existing syslog format deprecation in J if conf.use_syslog_rfc_format: - syslog = handlers.RFCSysLogHandler(facility=facility) + syslog = handlers.RFCSysLogHandler(address='/dev/log', + facility=facility) else: - syslog = logging.handlers.SysLogHandler(facility=facility) + syslog = logging.handlers.SysLogHandler(address='/dev/log', + facility=facility) log_root.addHandler(syslog) except socket.error: log_root.error('Unable to add syslog handler. Verify that syslog ' -- cgit v1.2.1