Move ratelimit warning log to debug

This commit is contained in:
Toastie 2024-12-27 01:26:48 +13:00
parent 8bf14fcd05
commit 3feaf50b59
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4

View file

@ -75,6 +75,12 @@ public class Logger : ILogger
if (!IsEnabled(logLevel))
return;
// Ratelimit messages are usually warnings, but they are unimportant in this case so downgrade them to debug.
if (formatter(state, exception).StartsWith("Hit Discord ratelimit on route "))
{
logLevel = LogLevel.Debug;
}
string[] logLevelParts = logLevel switch
{
LogLevel.Trace => ["[", "Trace", "] "],