diff --git a/EonaCat.Logger/DllInfo.cs b/EonaCat.Logger/DllInfo.cs
index 5c54e2f..b7e2981 100644
--- a/EonaCat.Logger/DllInfo.cs
+++ b/EonaCat.Logger/DllInfo.cs
@@ -20,7 +20,5 @@
internal static string VERSION_NAME { get; }
public static string ApplicationName { get; internal set; } = "EonaCatLogger";
-
- public static ELogType LogLevel { get; internal set; } = ELogType.INFO;
}
}
\ No newline at end of file
diff --git a/EonaCat.Logger/EonaCat.Logger.csproj b/EonaCat.Logger/EonaCat.Logger.csproj
index d77f662..1340d5b 100644
--- a/EonaCat.Logger/EonaCat.Logger.csproj
+++ b/EonaCat.Logger/EonaCat.Logger.csproj
@@ -9,7 +9,7 @@
net7.0;
icon.ico
- 1.0.6
+ 1.0.7
EonaCat (Jeroen Saey)
true
EonaCat (Jeroen Saey)
diff --git a/EonaCat.Logger/EonaCatCoreLogger/Internal/BatchingLogger.cs b/EonaCat.Logger/EonaCatCoreLogger/Internal/BatchingLogger.cs
index 4dcaf57..4b2b112 100644
--- a/EonaCat.Logger/EonaCatCoreLogger/Internal/BatchingLogger.cs
+++ b/EonaCat.Logger/EonaCatCoreLogger/Internal/BatchingLogger.cs
@@ -3,7 +3,6 @@ using EonaCat.Logger.Managers;
using EonaCatLogger.EonaCatCoreLogger.Models;
using Microsoft.Extensions.Logging;
using System;
-using System.Runtime;
namespace EonaCat.Logger.Internal
{
diff --git a/EonaCat.Logger/Managers/ILogManager.cs b/EonaCat.Logger/Managers/ILogManager.cs
index 8362d39..b5ecc86 100644
--- a/EonaCat.Logger/Managers/ILogManager.cs
+++ b/EonaCat.Logger/Managers/ILogManager.cs
@@ -2,6 +2,6 @@
{
public interface ILogManager
{
- void Write(string message, ELogType logType = ELogType.INFO, ELogType? logLevel = null, bool? writeToConsole = null);
+ void Write(string message, ELogType logType = ELogType.INFO, bool? writeToConsole = null);
}
}
\ No newline at end of file
diff --git a/EonaCat.Logger/Managers/LogManager.cs b/EonaCat.Logger/Managers/LogManager.cs
index 3c8d5e5..0ea4470 100644
--- a/EonaCat.Logger/Managers/LogManager.cs
+++ b/EonaCat.Logger/Managers/LogManager.cs
@@ -290,34 +290,26 @@ namespace EonaCat.Logger.Managers
public void Write(Exception exception, string module = null, string method = null, bool criticalException = false, bool? writeToConsole = null)
{
if (exception == null) return;
- Write(exception.FormatExceptionToMessage(module, method), criticalException ? ELogType.CRITICAL : ELogType.ERROR, null, writeToConsole);
+ Write(exception.FormatExceptionToMessage(module, method), criticalException ? ELogType.CRITICAL : ELogType.ERROR, writeToConsole);
}
- public void Write(string message, ELogType logType = ELogType.INFO, ELogType? logLevel = null, bool? writeToConsole = null)
+ public void Write(string message, ELogType logType = ELogType.INFO, bool? writeToConsole = null)
{
lock (_batton)
{
- if (logLevel == null)
- {
- logLevel = DllInfo.LogLevel;
- }
-
if (logType == ELogType.NONE)
{
return;
}
- if (logType == ELogType.CRITICAL || logType <= logLevel.GetValueOrDefault())
+ DateTime now = DateTime.Now;
+
+ if (!IsRunning)
{
- DateTime now = DateTime.Now;
-
- if (!IsRunning)
- {
- StartNewLog();
- }
-
- Write(now, message, logType, writeToConsole);
+ StartNewLog();
}
+
+ Write(now, message, logType, writeToConsole);
}
}