Skip to content

Commit

Permalink
reverting log changes; reducing less critical logging
Browse files Browse the repository at this point in the history
  • Loading branch information
vosmiic committed Jun 19, 2024
1 parent dc74193 commit 9abb704
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Api/AuthApiCall.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public AuthApiCall(IHttpClientFactory httpClientFactory,
DateTime lastCallDateTime = _memoryCache.Get<DateTime>(MemoryCacheHelper.GetLastCallDateTimeKey(provider));
if (lastCallDateTime != default)
{
_logger.LogWarning($"({provider}) Delaying API call to prevent 429 (too many requests)...");
_logger.LogDebug($"({provider}) Delaying API call to prevent 429 (too many requests)...");
await _delayer.Delay(DateTime.UtcNow.Subtract(lastCallDateTime));
}
while (attempts < 3) {
Expand Down Expand Up @@ -128,7 +128,7 @@ public AuthApiCall(IHttpClientFactory httpClientFactory,
attempts++;
break;
case HttpStatusCode.TooManyRequests:
_logger.LogDebug($"({provider}) API rate limit exceeded, retrying the API call again in {timeoutSeconds} seconds...");
_logger.LogWarning($"({provider}) API rate limit exceeded, retrying the API call again in {timeoutSeconds} seconds...");
await _delayer.Delay(TimeSpan.FromSeconds(timeoutSeconds));
timeoutSeconds *= timeoutIncrementMultiplier;
attempts++;
Expand Down

0 comments on commit 9abb704

Please sign in to comment.