mirror of
https://github.com/NoiTheCat/BirthdayBot.git
synced 2024-11-21 21:54:36 +00:00
Update log message filtering
This commit is contained in:
parent
bc2553ffad
commit
7ee4ff7ad1
1 changed files with 7 additions and 3 deletions
|
@ -92,14 +92,18 @@ public sealed class ShardInstance : IDisposable {
|
|||
case "Disconnected":
|
||||
case "Resumed previous session":
|
||||
case "Failed to resume previous session":
|
||||
case "Discord.WebSocket.GatewayReconnectException: Server requested a reconnect":
|
||||
case "Serializer Error": // The exception associated with this log appears a lot as of v3.2-ish
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
Log("Discord.Net", $"{arg.Severity}: {arg.Message}");
|
||||
}
|
||||
|
||||
if (arg.Exception != null) Log("Discord.Net exception", arg.Exception.ToString());
|
||||
if (arg.Exception != null) {
|
||||
if (arg.Exception is GatewayReconnectException
|
||||
|| arg.Exception.Message == "WebSocket connection was closed") return Task.CompletedTask;
|
||||
|
||||
Log("Discord.Net exception", arg.Exception.ToString());
|
||||
}
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue