hermes-socket-library/Socket/Data/LoggingMessage.cs

41 lines
941 B
C#

namespace HermesSocketLibrary.Socket.Data
{
public enum HermesLoggingLevel
{
Trace,
Debug,
Info,
Warn,
Error,
Critical,
None
}
public class LoggingMessage
{
public Exception? Exception { get; set; }
public string Message { get; set; }
public HermesLoggingLevel Level { get; set; }
public LoggingMessage(Exception exception, string message, HermesLoggingLevel level)
{
Exception = exception;
Message = message;
Level = level;
}
public LoggingMessage(string message, HermesLoggingLevel level)
{
Message = message;
Level = level;
Exception = null;
}
public LoggingMessage()
{
Message = string.Empty;
Level = HermesLoggingLevel.Info;
Exception = null;
}
}
}