From 7c8f5222c7574f06fef3310d4f39ebef99a0ff98 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Fri, 6 Feb 2015 16:04:11 -0500 Subject: [PATCH] log wsgi requests at INFO level Previously there was a random debug logging of the wsgi params, disconnected from the requests coming in. This isn't useful to anyone. Even though in an Apache env the access logs include the top level requests, logging the wsgi requests, with params in the horizon log is good form, and fits within the log guidelines. Change-Id: I268b8b4b424f60c8bf4b3fb93bd8804c8f7bc65a --- keystone/common/wsgi.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/keystone/common/wsgi.py b/keystone/common/wsgi.py index 4311abdaee..9759530450 100644 --- a/keystone/common/wsgi.py +++ b/keystone/common/wsgi.py @@ -19,6 +19,7 @@ """Utility methods for working with WSGI servers.""" import copy +import urllib from oslo import i18n from oslo.serialization import jsonutils @@ -189,7 +190,6 @@ class Application(BaseApplication): arg_dict = req.environ['wsgiorg.routing_args'][1] action = arg_dict.pop('action') del arg_dict['controller'] - LOG.debug('arg_dict: %s', arg_dict) # allow middleware up the stack to provide context, params and headers. context = req.environ.get(CONTEXT_ENV, {}) @@ -226,6 +226,10 @@ class Application(BaseApplication): # response code between GET and HEAD requests. The HTTP status should # be the same. req_method = req.environ['REQUEST_METHOD'].upper() + LOG.info('%(req_method)s %(path)s?%(params)s', { + 'req_method': req_method, + 'path': context['path'], + 'params': urllib.urlencode(params)}) params = self._normalize_dict(params)