Skip to content

Commit

Permalink
Merge pull request #536 from osu-tournament-rating/log-levels
Browse files Browse the repository at this point in the history
  • Loading branch information
hburn7 authored Nov 18, 2024
2 parents 97a5c13 + c371899 commit a132a69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DataWorkerService/AutomationChecks/AutomationCheckBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public virtual bool Check(TEntity entity)
/// <param name="entity">Entity that was checked</param>
protected virtual void OnPass(TEntity entity)
{
logger.LogDebug("Automation check passed [Id: {Id}]", entity.Id);
logger.LogTrace("Automation check passed [Id: {Id}]", entity.Id);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private async Task<HttpRequestMessage> PrepareRequestAsync(
}
};

logger.LogDebug(
logger.LogTrace(
"Preparing to fetch [Platform: {Platform} | Endpoint: {Endpoint} | Method: {Method}]",
request.Platform,
uri.ToString(),
Expand Down Expand Up @@ -181,7 +181,7 @@ private async Task RespectRateLimitAsync(
if (rateLimit.HasExpired)
{
rateLimit.Reset();
logger.LogDebug(
logger.LogTrace(
"Rate limit window elapsed, resetting [Platform: {Platform} | Tokens: {Remaining}/{Limit} " +
"| Expires In: {Expiry:mm\\:ss}]",
platform,
Expand All @@ -194,7 +194,7 @@ private async Task RespectRateLimitAsync(
// Throttle when no remaining tokens
if (rateLimit.RemainingTokens <= 0)
{
logger.LogWarning(
logger.LogDebug(
"Throttling client for rate limit violation [Platform: {Platform} | Tokens: {Remaining}/{Limit} " +
"| Expires In: {Expiry:mm\\:ss}]",
platform,
Expand All @@ -220,7 +220,7 @@ private void UpdateRateLimit(FetchPlatform platform)

rateLimit.DecrementRemainingTokens();

logger.LogDebug(
logger.LogTrace(
"Rate limit updated [Platform: {Platform} | Tokens: {Remaining}/{Limit} | Expires In: {Expiry:mm\\:ss}]",
platform,
rateLimit.RemainingTokens,
Expand Down

0 comments on commit a132a69

Please sign in to comment.