Merge "add caller name to _log_request_full log" into mcp/caracal
diff --git a/tempest/lib/common/rest_client.py b/tempest/lib/common/rest_client.py
index 6cf5b73..a2f2931 100644
--- a/tempest/lib/common/rest_client.py
+++ b/tempest/lib/common/rest_client.py
@@ -456,13 +456,20 @@
resp_log = resp.copy()
if 'x-subject-token' in resp_log:
resp_log['x-subject-token'] = '<omitted>'
- log_fmt = """Request - Headers: %s
+ # NOTE(sdague): while we still have 6 callers to this function
+ # we're going to just provide work around on who is actually
+ # providing timings by gracefully adding no content if they don't.
+ # Once we're down to 1 caller, clean this up.
+ caller_name = test_utils.find_test_caller()
+
+ log_fmt = """Request (%s) - Headers: %s
Body: %s
Response - Headers: %s
Body: %s"""
self.LOG.debug(
log_fmt,
+ caller_name,
str(req_headers),
self._safe_body(req_body),
str(resp_log),