From 3feaf50b594501d8ce3eedeb64357c01a3444466 Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 27 Dec 2024 01:26:48 +1300 Subject: [PATCH] Move ratelimit warning log to debug --- Logger.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Logger.cs b/Logger.cs index 1b898a7..e79c163 100644 --- a/Logger.cs +++ b/Logger.cs @@ -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", "] "],