From 2343f2aaf9fb66e633e305c1a1f5604a1988171f Mon Sep 17 00:00:00 2001 From: Mikayla Thompson Date: Tue, 22 Aug 2023 22:36:26 -0600 Subject: [PATCH] Update humanReadableLogs script Signed-off-by: Mikayla Thompson --- .../migrationConsole/humanReadableLogs.py | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/humanReadableLogs.py b/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/humanReadableLogs.py index 03471c020..c6427d018 100755 --- a/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/humanReadableLogs.py +++ b/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/humanReadableLogs.py @@ -14,29 +14,32 @@ logger = logging.getLogger(__name__) LOG_JSON_TUPLE_FIELD = "message" -BASE64_ENCODED_TUPLE_PATHS = ["request.body", "sourceResponse.body", "targetResponse.body"] +BASE64_ENCODED_TUPLE_PATHS = ["sourceRequest.body", "targetRequest.body", "sourceResponse.body", "targetResponse.body"] # TODO: I'm not positive about the capitalization of the Content-Encoding and Content-Type headers. # This version worked on my test cases, but not guaranteed to work in all cases. CONTENT_ENCODING_PATH = { - BASE64_ENCODED_TUPLE_PATHS[0]: "request.Content-Encoding", - BASE64_ENCODED_TUPLE_PATHS[1]: "sourceResponse.Content-Encoding", - BASE64_ENCODED_TUPLE_PATHS[2]: "targetResponse.Content-Encoding" + BASE64_ENCODED_TUPLE_PATHS[0]: "sourceRequest.Content-Encoding", + BASE64_ENCODED_TUPLE_PATHS[1]: "targetRequest.Content-Encoding", + BASE64_ENCODED_TUPLE_PATHS[2]: "sourceResponse.Content-Encoding", + BASE64_ENCODED_TUPLE_PATHS[3]: "targetResponse.Content-Encoding" } CONTENT_TYPE_PATH = { - BASE64_ENCODED_TUPLE_PATHS[0]: "request.Content-Type", - BASE64_ENCODED_TUPLE_PATHS[1]: "sourceResponse.Content-Type", - BASE64_ENCODED_TUPLE_PATHS[2]: "targetResponse.Content-Type" + BASE64_ENCODED_TUPLE_PATHS[0]: "sourceRequest.Content-Type", + BASE64_ENCODED_TUPLE_PATHS[1]: "targetRequest.Content-Encoding", + BASE64_ENCODED_TUPLE_PATHS[2]: "sourceResponse.Content-Type", + BASE64_ENCODED_TUPLE_PATHS[3]: "targetResponse.Content-Type" } TRANSFER_ENCODING_PATH = { - BASE64_ENCODED_TUPLE_PATHS[0]: "request.Transfer-Encoding", - BASE64_ENCODED_TUPLE_PATHS[1]: "sourceResponse.Transfer-Encoding", - BASE64_ENCODED_TUPLE_PATHS[2]: "targetResponse.Transfer-Encoding" + BASE64_ENCODED_TUPLE_PATHS[0]: "sourceRequest.Transfer-Encoding", + BASE64_ENCODED_TUPLE_PATHS[1]: "targetRequest.Content-Encoding", + BASE64_ENCODED_TUPLE_PATHS[2]: "sourceResponse.Transfer-Encoding", + BASE64_ENCODED_TUPLE_PATHS[3]: "targetResponse.Transfer-Encoding" } CONTENT_TYPE_JSON = "application/json" CONTENT_ENCODING_GZIP = "gzip" TRANSFER_ENCODING_CHUNKED = "chunked" -URI_PATH = "request.Request-URI" +URI_PATH = "sourceRequest.Request-URI" BULK_URI_PATH = "_bulk"