From dcff90e4b7fd64bf445bf163037802c73ede8d36 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 9 Jan 2025 12:34:33 +0800 Subject: [PATCH] clientcore, bug fix, logger null in HpptLoggingPolicy --- .../io/clientcore/core/http/pipeline/HttpLoggingPolicy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/clientcore/core/src/main/java/io/clientcore/core/http/pipeline/HttpLoggingPolicy.java b/sdk/clientcore/core/src/main/java/io/clientcore/core/http/pipeline/HttpLoggingPolicy.java index 373498d34fe53..c43ebca9a3c37 100644 --- a/sdk/clientcore/core/src/main/java/io/clientcore/core/http/pipeline/HttpLoggingPolicy.java +++ b/sdk/clientcore/core/src/main/java/io/clientcore/core/http/pipeline/HttpLoggingPolicy.java @@ -103,7 +103,7 @@ public Response process(HttpRequest httpRequest, HttpPipelineNextPolicy next) } private ClientLogger getLogger(HttpRequest request) { - if (request.getRequestOptions() != null) { + if (request.getRequestOptions() != null && request.getRequestOptions().getLogger() != null) { return request.getRequestOptions().getLogger(); }