From 39e4c3634477723790ca4aad57eab5e6b7f34703 Mon Sep 17 00:00:00 2001 From: Kristi Nikolla Date: Fri, 15 Jun 2018 18:06:05 -0400 Subject: [PATCH] Same line logs When logging, headers, url, method, etc, were in different lines making it hard to distinguish what belonged to the same request or response. This puts everything in the same line. Change-Id: I9aa8ce64fa98a13d5d26f80f4e690f2a8eda847b --- mixmatch/proxy.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mixmatch/proxy.py b/mixmatch/proxy.py index 2001997..4e56b8a 100644 --- a/mixmatch/proxy.py +++ b/mixmatch/proxy.py @@ -64,10 +64,10 @@ def strip_tokens_from_headers(headers): def format_for_log(title=None, method=None, url=None, headers=None, status_code=None): return ''.join([ - '{}:\n'.format(title) if title else '', - 'Method: {}\n'.format(method) if method else '', - 'URL: {}\n'.format(url) if url else '', - 'Headers: {}\n'.format( + '{}: '.format(title) if title else '', + 'Method: {}, '.format(method) if method else '', + 'URL: {}, '.format(url) if url else '', + 'Headers: {}, '.format( strip_tokens_from_headers(headers)) if headers else '', 'Status Code: {}\n'.format(status_code) if status_code else '' ])