update log level from Retry policy (#3586)
* update log level * Update sdk/core/azure-core/CHANGELOG.md Co-authored-by: Ahson Khan <ahkha@microsoft.com> Co-authored-by: Ahson Khan <ahkha@microsoft.com>
This commit is contained in:
parent
bdb71249ce
commit
d799012230
@ -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
|
||||
|
||||
@ -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<int>(sc))
|
||||
+ " won't be retried.");
|
||||
}
|
||||
|
||||
@ -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.");
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user