Updated packages

This commit is contained in:
2023-06-26 19:07:27 +02:00
parent a592aabef1
commit 478aa15b4f
15 changed files with 92 additions and 103 deletions

View File

@@ -1,7 +1,8 @@
using System;
using System.Collections.Generic;
using EonaCat.Logger.EonaCatCoreLogger;
using EonaCat.Logger.EonaCatCoreLogger.Models;
using EonaCat.Logger.Syslog;
using EonaCatLogger.EonaCatCoreLogger.Models;
namespace EonaCat.Logger.Managers
{
@@ -27,12 +28,12 @@ namespace EonaCat.Logger.Managers
{
get
{
return _HeaderFormat;
return _headerFormat;
}
set
{
if (string.IsNullOrEmpty(value)) _HeaderFormat = "";
else _HeaderFormat = value;
if (string.IsNullOrEmpty(value)) _headerFormat = "";
else _headerFormat = value;
}
}
@@ -43,12 +44,12 @@ namespace EonaCat.Logger.Managers
{
get
{
return _TimestampFormat;
return _timestampFormat;
}
set
{
if (string.IsNullOrEmpty(value)) throw new ArgumentNullException(nameof(HeaderFormat));
_TimestampFormat = value;
_timestampFormat = value;
}
}
@@ -61,12 +62,12 @@ namespace EonaCat.Logger.Managers
{
get
{
return _EnableConsole;
return _enableConsole;
}
set
{
if (value) _EnableConsole = ConsoleExists();
else _EnableConsole = false;
if (value) _enableConsole = ConsoleExists();
else _enableConsole = false;
}
}
@@ -137,12 +138,12 @@ namespace EonaCat.Logger.Managers
{
get
{
return _MaxMessageLength;
return _maxMessageLength;
}
set
{
if (value < 32) throw new ArgumentException("Maximum message length must be at least 32.");
_MaxMessageLength = value;
_maxMessageLength = value;
}
}
@@ -151,10 +152,10 @@ namespace EonaCat.Logger.Managers
/// </summary>
public string LogOrigin { get; set; }
private string _HeaderFormat = "{ts} {host} {thread} {sev}";
private string _TimestampFormat = "yyyy-MM-dd HH:mm:ss";
private bool _EnableConsole = true;
private int _MaxMessageLength = 1024;
private string _headerFormat = "{ts} {host} {thread} {sev}";
private string _timestampFormat = "yyyy-MM-dd HH:mm:ss";
private bool _enableConsole = true;
private int _maxMessageLength = 1024;
private ColorSchema _colors = new ColorSchema();