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
This commit is contained in:
parent
16a6c9c3df
commit
7c8f5222c7
|
@ -19,6 +19,7 @@
|
||||||
"""Utility methods for working with WSGI servers."""
|
"""Utility methods for working with WSGI servers."""
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
|
import urllib
|
||||||
|
|
||||||
from oslo import i18n
|
from oslo import i18n
|
||||||
from oslo.serialization import jsonutils
|
from oslo.serialization import jsonutils
|
||||||
|
@ -189,7 +190,6 @@ class Application(BaseApplication):
|
||||||
arg_dict = req.environ['wsgiorg.routing_args'][1]
|
arg_dict = req.environ['wsgiorg.routing_args'][1]
|
||||||
action = arg_dict.pop('action')
|
action = arg_dict.pop('action')
|
||||||
del arg_dict['controller']
|
del arg_dict['controller']
|
||||||
LOG.debug('arg_dict: %s', arg_dict)
|
|
||||||
|
|
||||||
# allow middleware up the stack to provide context, params and headers.
|
# allow middleware up the stack to provide context, params and headers.
|
||||||
context = req.environ.get(CONTEXT_ENV, {})
|
context = req.environ.get(CONTEXT_ENV, {})
|
||||||
|
@ -226,6 +226,10 @@ class Application(BaseApplication):
|
||||||
# response code between GET and HEAD requests. The HTTP status should
|
# response code between GET and HEAD requests. The HTTP status should
|
||||||
# be the same.
|
# be the same.
|
||||||
req_method = req.environ['REQUEST_METHOD'].upper()
|
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)
|
params = self._normalize_dict(params)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue