Skip to content

Commit

Permalink
Change verbose log display
Browse files Browse the repository at this point in the history
  • Loading branch information
HEJOK254 committed Jun 16, 2024
1 parent c58b094 commit f7fb264
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static Task LogAsync(string source, string message, LogSeverity severity
{
string msg = $"[{DateTime.UtcNow.ToString("HH.mm.ss")}] {source}: {message}";

// Change color based on severity
// Change color / display based on severity
switch (severity)
{
case LogSeverity.Warning:
Expand All @@ -70,6 +70,15 @@ public static Task LogAsync(string source, string message, LogSeverity severity
Console.ResetColor();
break;

case LogSeverity.Verbose:
// Verbose logs are only displayed if the debug flag is set to true in the config
if (config == null || !config.debug) break;

Console.ForegroundColor = ConsoleColor.DarkGray;
Console.WriteLine(msg);
Console.ResetColor();
break;

default:
// All other severities should have the default color of the console
Console.ResetColor();
Expand Down

0 comments on commit f7fb264

Please sign in to comment.