Setup logging, particularly for keystone middleware

Fixes bug 979282 and bug 988951

Change-Id: I895d00ac9648e8b3cb3ad1bf141c9bfe02ef3680
This commit is contained in:
Alessio Ababilov 2012-05-10 12:52:03 +03:00
parent 388e4098e3
commit f6088545d2
2 changed files with 4 additions and 0 deletions

View File

@ -3,6 +3,7 @@ Adam Gandelman <adamg@canonical.com>
Adam Johnson <adjohn@gmail.com>
Adrian Smith <adrian_f_smith@dell.com>
Ahmad Hassan <ahmad.hassan@hp.com>
Alessio Ababilov <aababilov@griddynamics.com>
Alex Meade <alex.meade@rackspace.com>
Alexander Sakhnov <asakhnov@mirantis.com>
Alexander Kovalev <akovalev@mirantis.com>

View File

@ -71,6 +71,7 @@ log_opts = [
'sqlalchemy=WARN',
'boto=WARN',
'suds=INFO',
'keystone=INFO',
'eventlet.wsgi.server=WARN'
],
help='list of logger=LEVEL pairs'),
@ -384,6 +385,8 @@ def _setup_logging_from_flags():
level = logging.getLevelName(level_name)
logger = logging.getLogger(mod)
logger.setLevel(level)
for handler in nova_root.handlers:
logger.addHandler(handler)
# NOTE(jkoelker) Clear the handlers for the root logger that was setup
# by basicConfig in nova/__init__.py and install the