From 69d71d17d2555d71ca46ed8e664af0ed18c5b871 Mon Sep 17 00:00:00 2001 From: AlexisPicot <33727614+AlexisPicot@users.noreply.github.com> Date: Tue, 5 Mar 2024 17:28:46 +0100 Subject: [PATCH] Update HangfireLogger.cs --- Hangfire.Console.Extensions/HangfireLogger.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Hangfire.Console.Extensions/HangfireLogger.cs b/Hangfire.Console.Extensions/HangfireLogger.cs index f345dc8..a53aad1 100644 --- a/Hangfire.Console.Extensions/HangfireLogger.cs +++ b/Hangfire.Console.Extensions/HangfireLogger.cs @@ -19,7 +19,18 @@ public IDisposable BeginScope(TState state) public bool IsEnabled(LogLevel logLevel) { - return true; + switch (logLevel) + { + case LogLevel.Critical: + case LogLevel.Error: + case LogLevel.Warning: + case LogLevel.Information: + case LogLevel.Debug: + case LogLevel.Trace: + return true; + default: + return false; + } } private ConsoleTextColor GetConsoleColor(LogLevel logLevel)