Skip to content

Commit

Permalink
this shit souldnt be required but it is
Browse files Browse the repository at this point in the history
  • Loading branch information
TheXorog committed Dec 24, 2021
1 parent 7c0339e commit 4f2e3aa
Showing 1 changed file with 26 additions and 17 deletions.
43 changes: 26 additions & 17 deletions BeatRecorder/Logger/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,35 +96,44 @@ public class Logger
_ => ConsoleColor.Gray
};

if (b.LogLevel == LoggerObjects.LogLevel.DEBUG && maxLogLevel >= LoggerObjects.LogLevel.DEBUG)
if (b.LogLevel == LoggerObjects.LogLevel.DEBUG)
{
Console.ResetColor(); Console.Write($"[{b.TimeOfEvent:dd.MM.yyyy HH:mm:ss}] ");
Console.ForegroundColor = LogLevelColor; Console.Write($"[{LogLevelText}] ");
Console.ResetColor(); Console.WriteLine(b.Message);
_loggerObjects.LogsToPost.Remove(b);
if (maxLogLevel == LoggerObjects.LogLevel.DEBUG)
{
Console.ResetColor(); Console.Write($"[{b.TimeOfEvent:dd.MM.yyyy HH:mm:ss}] ");
Console.ForegroundColor = LogLevelColor; Console.Write($"[{LogLevelText}] ");
Console.ResetColor(); Console.WriteLine(b.Message);
_loggerObjects.LogsToPost.Remove(b);
}
}
else if (b.LogLevel == LoggerObjects.LogLevel.INFO && maxLogLevel >= LoggerObjects.LogLevel.INFO)
else if (b.LogLevel == LoggerObjects.LogLevel.INFO)
{
Console.ResetColor(); Console.Write($"[{b.TimeOfEvent:dd.MM.yyyy HH:mm:ss}] ");
Console.ForegroundColor = LogLevelColor; Console.Write($"[{LogLevelText}] ");
Console.ResetColor(); Console.WriteLine(b.Message);
_loggerObjects.LogsToPost.Remove(b);
if (maxLogLevel == LoggerObjects.LogLevel.DEBUG || maxLogLevel == LoggerObjects.LogLevel.INFO)
{
Console.ResetColor(); Console.Write($"[{b.TimeOfEvent:dd.MM.yyyy HH:mm:ss}] ");
Console.ForegroundColor = LogLevelColor; Console.Write($"[{LogLevelText}] ");
Console.ResetColor(); Console.WriteLine(b.Message);
_loggerObjects.LogsToPost.Remove(b);
}
}
else if (b.LogLevel == LoggerObjects.LogLevel.WARN && maxLogLevel >= LoggerObjects.LogLevel.WARN)
else if (b.LogLevel == LoggerObjects.LogLevel.WARN)
{
Console.ResetColor(); Console.Write($"[{b.TimeOfEvent:dd.MM.yyyy HH:mm:ss}] ");
Console.ForegroundColor = LogLevelColor; Console.Write($"[{LogLevelText}] ");
Console.ResetColor(); Console.WriteLine(b.Message);
_loggerObjects.LogsToPost.Remove(b);
if (maxLogLevel == LoggerObjects.LogLevel.DEBUG || maxLogLevel == LoggerObjects.LogLevel.INFO || maxLogLevel == LoggerObjects.LogLevel.WARN)
{
Console.ResetColor(); Console.Write($"[{b.TimeOfEvent:dd.MM.yyyy HH:mm:ss}] ");
Console.ForegroundColor = LogLevelColor; Console.Write($"[{LogLevelText}] ");
Console.ResetColor(); Console.WriteLine(b.Message);
_loggerObjects.LogsToPost.Remove(b);
}
}
else if (b.LogLevel == LoggerObjects.LogLevel.ERROR && maxLogLevel >= LoggerObjects.LogLevel.ERROR)
else if (b.LogLevel == LoggerObjects.LogLevel.ERROR)
{
Console.ResetColor(); Console.Write($"[{b.TimeOfEvent:dd.MM.yyyy HH:mm:ss}] ");
Console.ForegroundColor = LogLevelColor; Console.Write($"[{LogLevelText}] ");
Console.ResetColor(); Console.WriteLine(b.Message);
_loggerObjects.LogsToPost.Remove(b);
}
else if (b.LogLevel == LoggerObjects.LogLevel.FATAL && maxLogLevel >= LoggerObjects.LogLevel.FATAL)
else if (b.LogLevel == LoggerObjects.LogLevel.FATAL)
{
Console.ResetColor();
Console.ForegroundColor = ConsoleColor.Black; Console.BackgroundColor = LogLevelColor; Console.Write($"[{b.TimeOfEvent:dd.MM.yyyy HH:mm:ss}] ");
Expand Down

0 comments on commit 4f2e3aa

Please sign in to comment.