Browse Source

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
Kristi Nikolla 10 months ago
parent
commit
39e4c36344
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      mixmatch/proxy.py

+ 4
- 4
mixmatch/proxy.py View File

@@ -64,10 +64,10 @@ def strip_tokens_from_headers(headers):
64 64
 def format_for_log(title=None, method=None, url=None, headers=None,
65 65
                    status_code=None):
66 66
     return ''.join([
67
-        '{}:\n'.format(title) if title else '',
68
-        'Method: {}\n'.format(method) if method else '',
69
-        'URL: {}\n'.format(url) if url else '',
70
-        'Headers: {}\n'.format(
67
+        '{}: '.format(title) if title else '',
68
+        'Method: {}, '.format(method) if method else '',
69
+        'URL: {}, '.format(url) if url else '',
70
+        'Headers: {}, '.format(
71 71
             strip_tokens_from_headers(headers)) if headers else '',
72 72
         'Status Code: {}\n'.format(status_code) if status_code else ''
73 73
     ])

Loading…
Cancel
Save