Merge "Handle string status codes in logging"

This commit is contained in:
Zuul 2019-01-09 09:37:47 +00:00 committed by Gerrit Code Review
commit da34b35579
2 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ class FaultWrapper(base_wsgi.Middleware):
status = http_client.INTERNAL_SERVER_ERROR
msg_dict = dict(url=req.url, status=status)
LOG.info("%(url)s returned with HTTP %(status)d", msg_dict)
LOG.info("%(url)s returned with HTTP %(status)s", msg_dict)
outer = self.status_to_type(status)
if headers:
outer.headers = headers

View File

@ -936,7 +936,7 @@ class Resource(wsgi.Application):
try:
msg_dict = dict(url=request.url, status=response.status_int)
msg = "%(url)s returned with HTTP %(status)d"
msg = "%(url)s returned with HTTP %(status)s"
except AttributeError as e:
msg_dict = dict(url=request.url, e=e)
msg = "%(url)s returned a fault: %(e)s"