mirror of
https://github.com/NoiTheCat/BirthdayBot.git
synced 2024-11-21 13:54:36 +00:00
Suppress unneeded log messages
This commit is contained in:
parent
6f4222497e
commit
99786a7b70
1 changed files with 3 additions and 1 deletions
|
@ -43,7 +43,6 @@ namespace BirthdayBot
|
|||
/// </summary>
|
||||
public static void Log(string source, string message)
|
||||
{
|
||||
// Add file logging later?
|
||||
var ts = DateTime.UtcNow;
|
||||
var ls = new string[]{ "\r\n", "\n" };
|
||||
foreach (var item in message.Split(ls, StringSplitOptions.None))
|
||||
|
@ -52,6 +51,9 @@ namespace BirthdayBot
|
|||
|
||||
private static Task DNetLog(LogMessage arg)
|
||||
{
|
||||
// Suppress 'Unknown Dispatch' messages
|
||||
if (arg.Message.StartsWith("Unknown Dispatch ")) return Task.CompletedTask;
|
||||
|
||||
if (arg.Severity <= LogSeverity.Info)
|
||||
{
|
||||
Log("Discord.Net", $"{arg.Severity}: {arg.Message}");
|
||||
|
|
Loading…
Reference in a new issue