implement log of response header
This commit is contained in:
@@ -262,6 +262,11 @@ class Application(ApplicationPartDelete, ApplicationPartHead,
|
|||||||
# Add extra headers set in configuration
|
# Add extra headers set in configuration
|
||||||
headers.update(self._extra_headers)
|
headers.update(self._extra_headers)
|
||||||
|
|
||||||
|
if self._response_header_on_debug:
|
||||||
|
logger.debug("Response header:\n%s", utils.textwrap_str(pprint.pformat(headers)))
|
||||||
|
else:
|
||||||
|
logger.debug("Response header: suppressed by config/option [logging] response_header_on_debug")
|
||||||
|
|
||||||
# Start response
|
# Start response
|
||||||
time_end = datetime.datetime.now()
|
time_end = datetime.datetime.now()
|
||||||
time_delta_seconds = (time_end - time_begin).total_seconds()
|
time_delta_seconds = (time_end - time_begin).total_seconds()
|
||||||
|
|||||||
Reference in New Issue
Block a user