From 815009eac8647db102b69e6b7e0ef336c9eda549 Mon Sep 17 00:00:00 2001 From: Steve Loughran Date: Mon, 4 Dec 2023 15:47:45 +0000 Subject: [PATCH] HADOOP-18999. Debug level logging within AWS V2 SDK httpclient and trace level switches sdk classes to tracing Change-Id: I192a186c4597f1fad7ae4ca8741795049b795ea2 --- .../org/apache/hadoop/fs/s3a/DefaultS3ClientFactory.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/DefaultS3ClientFactory.java b/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/DefaultS3ClientFactory.java index 3630b795df7fe..bceeedcbbf3ed 100644 --- a/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/DefaultS3ClientFactory.java +++ b/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/DefaultS3ClientFactory.java @@ -166,8 +166,11 @@ public S3Client createS3Client( @VisibleForTesting public static boolean maybeTurnOnSdkLogging() { if (LOG_SDK.isDebugEnabled()) { - LOG_SDK.debug("Enabling SDK logging at {} level", SDK_LOG_LEVEL); + LOG_SDK.debug("Enabling SDK logging at {}", SDK_LOG_LEVEL); return enableLogging(SDK_LOG_LEVEL, SDK_LOGS); + } else if (LOG_SDK.isTraceEnabled()) { + LOG_SDK.debug("Enabling SDK logging at {}", LogControl.LogLevel.TRACE); + return enableLogging(LogControl.LogLevel.TRACE, SDK_LOGS); } return false; }