using AyCode.Core.Enums; namespace AyCode.Core.Loggers; public class AcLogItemClient : IAcLogItemClient { public DateTime TimeStampUtc { get; set; } public AppType AppType { get; set; } public LogLevel LogLevel { get; set; } public int ThreadId { get; set; } = Environment.CurrentManagedThreadId; public string? CategoryName { get; set; } public string? CallerName { get; set; } public string? Text { get; set; } public string? ErrorType { get; set; } public string? Exception { get; set; } public override string? ToString() => Text ?? base.ToString(); //public string ErrorText() => string.IsNullOrWhiteSpace(ErrorType) ? string.Empty : $"{AcEnv.NL}[{ErrorType.ToUpper()}]: {Exception}"; //public string ToMinimalText() => $"{"[" + CategoryName + "->" + CallerName + "]"} - {"[" + ThreadId + "]", 5} {Text}{ErrorText()}"; //public string ToNormalText() // => $"{"[" + LogLevel + "]",-9} {"[" + CategoryName + "->" + CallerName + "]"} - {"[" + ThreadId + "]", 5} {Text}{ErrorText()}"; //public string ToDetailText() // => $"[{TimeStampUtc.ToLocalTime():HH:mm:ss.fff}] {"[" + LogLevel + "]",-9} {"[" + CategoryName + "->" + CallerName + "]", -55} {"[" + ThreadId + "]", 5} {Text}{ErrorText()}"; //public string ToDiagnosticText() // => $"[{TimeStampUtc.ToLocalTime():HH:mm:ss.fff}] [{AppType.ToString()[0]}] {"[" + LogLevel + "]",-9} {"[" + CategoryName + "->" + CallerName + "]", -54} {"[" + ThreadId + "]", 5} {Text}{ErrorText()}"; }