enable/disable the filtering of non-warning log messages
This commit is contained in:
parent
3f6d581c83
commit
0b5d0b7c4e
|
@ -72,13 +72,16 @@ public class DiscordBot
|
||||||
{
|
{
|
||||||
//as time goes on, we may encounter logged info that we literally don't care about. Fill out an if statement to properly
|
//as time goes on, we may encounter logged info that we literally don't care about. Fill out an if statement to properly
|
||||||
//filter it out to avoid logging it to discord.
|
//filter it out to avoid logging it to discord.
|
||||||
if (a.Message.Contains("Server requested a reconnect"))
|
if (localSettings.FilterOutNonIssueWarnings)
|
||||||
{
|
{
|
||||||
//This is to filter out this message. This warning is for discord server load balancing and isn't a problem
|
if (a.Message.Contains("Server requested a reconnect"))
|
||||||
|
{
|
||||||
|
//This is to filter out this message. This warning is for discord server load balancing and isn't a problem
|
||||||
|
|
||||||
//Warning[Discord: Gateway] Discord.WebSocket.GatewayReconnectException: Server requested a reconnect
|
//Warning[Discord: Gateway] Discord.WebSocket.GatewayReconnectException: Server requested a reconnect
|
||||||
//Warning[Discord: Gateway] at Discord.ConnectionManager.<> c__DisplayClass29_0.<< StartAsync > b__0 > d.MoveNext()
|
//Warning[Discord: Gateway] at Discord.ConnectionManager.<> c__DisplayClass29_0.<< StartAsync > b__0 > d.MoveNext()
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
string message = a.Message + (a.Exception != null ? "Exception: " + a.Exception.ToString() : "");
|
string message = a.Message + (a.Exception != null ? "Exception: " + a.Exception.ToString() : "");
|
||||||
ConsoleColor col;
|
ConsoleColor col;
|
||||||
|
|
|
@ -77,6 +77,7 @@ public class Settings {
|
||||||
[JsonProperty(PropertyName = "LogChannel")]
|
[JsonProperty(PropertyName = "LogChannel")]
|
||||||
public string? AdminChannel { get; set; }
|
public string? AdminChannel { get; set; }
|
||||||
public bool LogCommands { get; set; } = false;
|
public bool LogCommands { get; set; } = false;
|
||||||
|
public bool FilterOutNonIssueWarnings { get; set; } = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ShineTable {
|
public class ShineTable {
|
||||||
|
|
Loading…
Reference in New Issue