summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stanford <john@solinea.com>2015-02-26 12:47:16 -0800
committerJohn Stanford <john@solinea.com>2015-02-26 12:49:07 -0800
commit2bf8164a908b51c13d4709e63e7cb2905b5548c7 (patch)
tree6a4122c039a2d216b56f3badaa806de6b0ce3b86
parent5139941a0c8d63ae33421a2082e35fae0f800b67 (diff)
downloadoslo-log-2bf8164a908b51c13d4709e63e7cb2905b5548c7.tar.gz
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
-rw-r--r--oslo_log/log.py6
1 files 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 '