48 lines
905 B
C#
48 lines
905 B
C#
using System;
|
|
using System.Diagnostics;
|
|
using log4net.Core;
|
|
|
|
namespace Aitex.Core.RT.Log
|
|
{
|
|
internal struct LogItem
|
|
{
|
|
#region Constructors
|
|
|
|
public LogItem(string message, StackFrame stackFrame, Level level, Exception exception, string sourceFile)
|
|
{
|
|
Message = message;
|
|
Time = DateTime.Now;
|
|
StackFrame = stackFrame;
|
|
Level = level;
|
|
Exception = exception;
|
|
SourceFile = sourceFile;
|
|
}
|
|
|
|
#endregion
|
|
|
|
|
|
#region Properties
|
|
|
|
public string Message { get; }
|
|
|
|
public DateTime Time { get; }
|
|
|
|
public StackFrame StackFrame { get; }
|
|
|
|
public Level Level { get; }
|
|
|
|
public Exception Exception { get; }
|
|
|
|
public string SourceFile { get; }
|
|
|
|
public override string ToString()
|
|
{
|
|
return Message;
|
|
}
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
|
}
|