Move ratelimit warning log to debug
This commit is contained in:
parent
8bf14fcd05
commit
3feaf50b59
1 changed files with 6 additions and 0 deletions
|
@ -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", "] "],
|
||||
|
|
Loading…
Reference in a new issue