1
0

LogWriteEventArgs.cs 912 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System;
  2. namespace YOLODetectProcessLib
  3. {
  4. /// <summary>
  5. /// log类型
  6. /// </summary>
  7. public enum EnumLogType
  8. {
  9. InfoLog,
  10. WarnLog,
  11. ErrorLog,
  12. FatalLog,
  13. }
  14. /// <summary>
  15. /// 有log要写
  16. /// </summary>
  17. public class LogWriteEventArgs : EventArgs
  18. {
  19. /// <summary>
  20. /// log的类型
  21. /// </summary>
  22. public EnumLogType LogType { get; }
  23. /// <summary>
  24. /// log的内容
  25. /// </summary>
  26. public string Msg { get; }
  27. /// <summary>
  28. /// 构造函数
  29. /// </summary>
  30. /// <param name="logType"></param>
  31. /// <param name="logs"></param>
  32. public LogWriteEventArgs(EnumLogType logType, params string[] logs)
  33. {
  34. LogType = logType;
  35. string msg = string.Join("\n", logs);
  36. Msg = msg;
  37. }
  38. }
  39. }