Added test program

This commit is contained in:
2023-07-12 18:19:28 +02:00
parent 1742537612
commit 4627e103fe
13 changed files with 351 additions and 306 deletions

View File

@@ -14,6 +14,8 @@ namespace EonaCat.Logger.Managers
public event LogDelegate OnLog;
public delegate void LogDelegate(EonaCatLogMessage message);
public string Id { get; set; } = "EonaCatLogger";
/// <summary>
/// Determines if we need to remove the prefix [EonaCatLogger] from each message (default: false)
/// </summary>
@@ -100,6 +102,8 @@ namespace EonaCat.Logger.Managers
}
}
public ELogType MaxLogType { get; set; } = ELogType.TRACE;
public bool SendToSyslogServers { get; set; }
public List<SyslogServer> SysLogServers { get; set; }
@@ -136,22 +140,6 @@ namespace EonaCat.Logger.Managers
return new FileLoggerOptions();
}
/// <summary>
/// Maximum message length. Must be greater than or equal to 32. Default is 1024.
/// </summary>
public int MaxMessageLength
{
get
{
return _maxMessageLength;
}
set
{
if (value < 32) throw new ArgumentException("Maximum message length must be at least 32.");
_maxMessageLength = value;
}
}
/// <summary>
/// Set the origin of where the OnLog event was initiated
/// </summary>