summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Heck <heckj@mac.com>2012-01-10 14:33:15 -0800
committerJoe Heck <heckj@mac.com>2012-01-10 14:33:15 -0800
commitd940dc40e6d8cdd688314203e9f12f2149380c19 (patch)
treeb89ef005c189e3854e17eb4de0e4b97f62ea9169
parentc3c05cbabd1f88fcef68ecb834f090f82955fd45 (diff)
fixing imports for syslog handlers and gettext
-rw-r--r--keystone/config.py6
-rw-r--r--keystone/logging.py3
2 files changed, 5 insertions, 4 deletions
diff --git a/keystone/config.py b/keystone/config.py
index 5bb084c2..6e8e163f 100644
--- a/keystone/config.py
+++ b/keystone/config.py
@@ -65,13 +65,13 @@ def setup_logging(conf):
if conf.use_syslog:
try:
- facility = getattr(logging.handlers.SysLogHandler,
+ facility = getattr(logging.SysLogHandler,
conf.syslog_log_facility)
except AttributeError:
raise ValueError(_("Invalid syslog facility"))
- handler = logging.handlers.SysLogHandler(address='/dev/log',
- facility=facility)
+ handler = logging.SysLogHandler(address='/dev/log',
+ facility=facility)
elif conf.log_file:
logfile = conf.log_file
if conf.log_dir:
diff --git a/keystone/logging.py b/keystone/logging.py
index d7cc6756..bac4e238 100644
--- a/keystone/logging.py
+++ b/keystone/logging.py
@@ -4,6 +4,7 @@ import functools
import logging
import pprint
+from logging.handlers import SysLogHandler
# A list of things we want to replicate from logging.
# levels
@@ -36,7 +37,7 @@ Formatter = logging.Formatter
StreamHandler = logging.StreamHandler
#WatchedFileHandler = logging.handlers.WatchedFileHandler
# logging.SysLogHandler is nicer than logging.logging.handler.SysLogHandler.
-#SysLogHandler = logging.handlers.SysLogHandler
+SysLogHandler = SysLogHandler
def log_debug(f):