Updated
This commit is contained in:
@@ -8,7 +8,7 @@ namespace EonaCat.Logger.Test.Web;
|
||||
public static class Logger
|
||||
{
|
||||
private static LogManager LogManager;
|
||||
public static ELogType MinLogType { get; set; }
|
||||
public static ELogType MaxLogType { get; set; }
|
||||
public static bool UseLocalTime { get; set; }
|
||||
public static string LogFolder => Path.Combine(FileLoggerOptions.DefaultPath, "logs");
|
||||
public static string CurrentLogFile => LogManager.CurrentLogFile;
|
||||
@@ -98,7 +98,10 @@ public static class Logger
|
||||
if (IsDisabled)
|
||||
return;
|
||||
|
||||
LogManager.Write(exception, message, writeToConsole: writeToConsole);
|
||||
if (ELogType.ERROR <= MaxLogType)
|
||||
{
|
||||
LogManager.Write(exception, message, writeToConsole: writeToConsole);
|
||||
}
|
||||
}
|
||||
|
||||
public static void Configure()
|
||||
@@ -106,7 +109,7 @@ public static class Logger
|
||||
var loggerSettings = new LoggerSettings
|
||||
{
|
||||
Id = "EonaCatTestLogger",
|
||||
MinLogType = ELogType.INFO,
|
||||
MaxLogType = ELogType.INFO,
|
||||
UseLocalTime = UseLocalTime,
|
||||
FileLoggerOptions =
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user