LogEntity.cs 892 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System.ComponentModel;
  2. namespace VCommon.Logging.Viewer
  3. {
  4. internal class LogEntity
  5. {
  6. [Description("文件名")]
  7. public string FileName { get; set; }
  8. [Description("时间")]
  9. public string WriteTime { get; set; }
  10. [Description("级别")]
  11. public string Level { get; set; }
  12. [Description("线程名")]
  13. public string ThreadName { get; set; }
  14. [Description("摘要")]
  15. public string Summary { get; set; }
  16. [Description("详情")]
  17. public string Detail { get; set; }
  18. [Description("行号")]
  19. public int LineNumber { get; set; }
  20. /// <summary>
  21. /// 或者把原始日志给ListViewItem的Tag
  22. /// </summary>
  23. /// <returns></returns>
  24. public override string ToString() => $@"{WriteTime} {Level} {ThreadName}
  25. {Summary}
  26. {Detail}";
  27. }
  28. }