Remove newlines from request and response log
Do not surround request and response messages with newline characters to simplify reading by robots. Change-Id: I2efec1154cd9a327ed25b342e10d9205a22fda1c
This commit is contained in:
@@ -134,13 +134,13 @@ def http_log_req(_logger, args, kwargs):
|
||||
if 'body' in kwargs and kwargs['body']:
|
||||
string_parts.append(" -d '%s'" % (kwargs['body']))
|
||||
req = encodeutils.safe_encode("".join(string_parts))
|
||||
_logger.debug("\nREQ: %s\n", req)
|
||||
_logger.debug("REQ: %s", req)
|
||||
|
||||
|
||||
def http_log_resp(_logger, resp, body):
|
||||
if not _logger.isEnabledFor(logging.DEBUG):
|
||||
return
|
||||
_logger.debug("RESP:%(code)s %(headers)s %(body)s\n",
|
||||
_logger.debug("RESP: %(code)s %(headers)s %(body)s",
|
||||
{'code': resp.status_code,
|
||||
'headers': resp.headers,
|
||||
'body': body})
|
||||
|
||||
Reference in New Issue
Block a user