mirror of
https://github.com/tribufu/tribufu-dotnet
synced 2025-06-16 18:34:19 +00:00
Update log levels
This commit is contained in:
@ -7,16 +7,14 @@ namespace Tribufu.Logging
|
||||
{
|
||||
Off = 0,
|
||||
|
||||
Trace = 1,
|
||||
Error = 1,
|
||||
|
||||
Debug = 2,
|
||||
Warn = 2,
|
||||
|
||||
Info = 3,
|
||||
|
||||
Warn = 4,
|
||||
Debug = 4,
|
||||
|
||||
Error = 5,
|
||||
|
||||
All = 6,
|
||||
Trace = 5,
|
||||
}
|
||||
}
|
||||
|
@ -41,12 +41,7 @@ namespace Tribufu.Logging
|
||||
|
||||
private static void Log(LogLevel level, string message, ConsoleColor color)
|
||||
{
|
||||
if (_level == LogLevel.Off)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (_level == LogLevel.All || level >= _level)
|
||||
if (level <= _level)
|
||||
{
|
||||
var defaultColor = Console.ForegroundColor;
|
||||
Console.ForegroundColor = color;
|
||||
|
Reference in New Issue
Block a user