From 8a2a2c724981b850729fcde20360679edd8b0769 Mon Sep 17 00:00:00 2001 From: Dolph Mathews Date: Fri, 18 Jan 2013 17:58:32 -0600 Subject: Silence routes internal debug logging Eliminates this spam while running keystone in debug: routes.middleware: DEBUG: Initialized with method overriding = True, and path info altering = True Change-Id: I1ff1fb13b4bfea968a2ba8fe194141c98541c6b8 --- keystone/common/wsgi.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/keystone/common/wsgi.py b/keystone/common/wsgi.py index 42a4bc31..1ba584c1 100644 --- a/keystone/common/wsgi.py +++ b/keystone/common/wsgi.py @@ -31,10 +31,12 @@ import webob.exc from keystone.common import logging from keystone.common import utils +from keystone import config from keystone import exception from keystone.openstack.common import jsonutils +CONF = config.CONF LOG = logging.getLogger(__name__) # Environment variable used to pass the request context @@ -414,6 +416,11 @@ class Router(object): mapper.connect(None, '/v1.0/{path_info:.*}', controller=BlogApp()) """ + # if we're only running in debug, bump routes' internal logging up a + # notch, as it's very spammy + if CONF.debug: + logging.getLogger('routes.middleware').setLevel(logging.INFO) + self.map = mapper self._router = routes.middleware.RoutesMiddleware(self._dispatch, self.map) -- cgit