diff --git a/sdk/core/azure-core/CHANGELOG.md b/sdk/core/azure-core/CHANGELOG.md index c89674e3d..d444082a5 100644 --- a/sdk/core/azure-core/CHANGELOG.md +++ b/sdk/core/azure-core/CHANGELOG.md @@ -12,6 +12,8 @@ ### Other Changes +- [[#3581]](https://github.com/Azure/azure-sdk-for-cpp/issues/3581) Update log level in retry policy from warning to informational. + ## 1.5.0 (2022-03-31) ### Features Added diff --git a/sdk/core/azure-core/src/http/retry_policy.cpp b/sdk/core/azure-core/src/http/retry_policy.cpp index 2e7b93460..99d8f409d 100644 --- a/sdk/core/azure-core/src/http/retry_policy.cpp +++ b/sdk/core/azure-core/src/http/retry_policy.cpp @@ -214,10 +214,10 @@ bool RetryPolicy::ShouldRetryOnResponse( auto const sc = response.GetStatusCode(); if (statusCodes.find(sc) == statusCodes.end()) { - if (Log::ShouldWrite(Logger::Level::Warning)) + if (Log::ShouldWrite(Logger::Level::Informational)) { Log::Write( - Logger::Level::Warning, + Logger::Level::Informational, std::string("HTTP status code ") + std::to_string(static_cast(sc)) + " won't be retried."); } diff --git a/sdk/core/azure-core/test/ut/retry_policy_test.cpp b/sdk/core/azure-core/test/ut/retry_policy_test.cpp index 2fd7dc28a..da2db233d 100644 --- a/sdk/core/azure-core/test/ut/retry_policy_test.cpp +++ b/sdk/core/azure-core/test/ut/retry_policy_test.cpp @@ -830,6 +830,6 @@ TEST(RetryPolicy, LogMessages) EXPECT_EQ(log.Entries[3].Level, Logger::Level::Informational); EXPECT_EQ(log.Entries[3].Message, "HTTP Retry attempt #2 will be made in 0ms."); - EXPECT_EQ(log.Entries[4].Level, Logger::Level::Warning); + EXPECT_EQ(log.Entries[4].Level, Logger::Level::Informational); EXPECT_EQ(log.Entries[4].Message, "HTTP status code 503 won't be retried."); }