123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- using System;
- namespace YOLODetectProcessLib
- {
- /// <summary>
- /// log类型
- /// </summary>
- public enum EnumLogType
- {
- InfoLog,
- WarnLog,
- ErrorLog,
- FatalLog,
- }
- /// <summary>
- /// 有log要写
- /// </summary>
- public class LogWriteEventArgs : EventArgs
- {
- /// <summary>
- /// log的类型
- /// </summary>
- public EnumLogType LogType { get; }
- /// <summary>
- /// log的内容
- /// </summary>
- public string Msg { get; }
- /// <summary>
- /// 构造函数
- /// </summary>
- /// <param name="logType"></param>
- /// <param name="logs"></param>
- public LogWriteEventArgs(EnumLogType logType, params string[] logs)
- {
- LogType = logType;
- string msg = string.Join("\n", logs);
- Msg = msg;
- }
- }
- }
|