From e39d2fdaefd12c9fd8a7c87417757e46fecd6029 Mon Sep 17 00:00:00 2001 From: Luciano Mammino Date: Mon, 5 Feb 2024 17:24:37 +0000 Subject: [PATCH 1/2] Update lib.rs: Response vs Request in trace! log --- lambda-runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lambda-runtime/src/lib.rs b/lambda-runtime/src/lib.rs index 3a91d943..bfeb6891 100644 --- a/lambda-runtime/src/lib.rs +++ b/lambda-runtime/src/lib.rs @@ -126,7 +126,7 @@ impl Runtime { // Group the handling in one future and instrument it with the span async { let body = body.collect().await?.to_bytes(); - trace!("response body - {}", std::str::from_utf8(&body)?); + trace!("request body - {}", std::str::from_utf8(&body)?); #[cfg(debug_assertions)] if parts.status.is_server_error() { From 9a1768e2e652dba7229c95956465f67b8236d3cd Mon Sep 17 00:00:00 2001 From: Luciano Mammino Date: Tue, 6 Feb 2024 19:36:25 +0000 Subject: [PATCH 2/2] Update lambda-runtime/src/lib.rs Co-authored-by: David Calavera --- lambda-runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lambda-runtime/src/lib.rs b/lambda-runtime/src/lib.rs index bfeb6891..871991a7 100644 --- a/lambda-runtime/src/lib.rs +++ b/lambda-runtime/src/lib.rs @@ -126,7 +126,7 @@ impl Runtime { // Group the handling in one future and instrument it with the span async { let body = body.collect().await?.to_bytes(); - trace!("request body - {}", std::str::from_utf8(&body)?); + trace!(body = std::str::from_utf8(&body)?, "raw JSON event received from Lambda"); #[cfg(debug_assertions)] if parts.status.is_server_error() {