log depth also on response log line

This commit is contained in:
Peter Bieringer 2016-09-19 20:11:52 +02:00
parent f52fa73cab
commit c578470fc3

View File

@ -299,7 +299,7 @@ class Application:
time_end = datetime.datetime.now() time_end = datetime.datetime.now()
status = "%i %s" % ( status = "%i %s" % (
status, client.responses.get(status, "Unknown")) status, client.responses.get(status, "Unknown"))
self.logger.info("%s answer status for %s in %s sec: %s", environ["REQUEST_METHOD"], environ["PATH_INFO"], (time_end - time_begin).total_seconds(), status) self.logger.info("%s answer status for %s in %s sec: %s", environ["REQUEST_METHOD"], environ["PATH_INFO"] + depthinfo, (time_end - time_begin).total_seconds(), status)
start_response(status, list(headers.items())) start_response(status, list(headers.items()))
# Return response content # Return response content
return [answer] if answer else [] return [answer] if answer else []