From 9abb704476c4a6fe478758d1123cf69063126661 Mon Sep 17 00:00:00 2001 From: vosmiic <44092756+vosmiic@users.noreply.github.com> Date: Wed, 19 Jun 2024 21:01:56 +0100 Subject: [PATCH] reverting log changes; reducing less critical logging --- Api/AuthApiCall.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Api/AuthApiCall.cs b/Api/AuthApiCall.cs index 7482eba..76508ca 100644 --- a/Api/AuthApiCall.cs +++ b/Api/AuthApiCall.cs @@ -69,7 +69,7 @@ public AuthApiCall(IHttpClientFactory httpClientFactory, DateTime lastCallDateTime = _memoryCache.Get(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) { @@ -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++;