平安校园
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

LoggingSetting.cs 1.1 KiB

4 months ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. 
  2. //
  3. namespace SafeCampus.Core;
  4. /// <summary>
  5. /// 日志配置
  6. /// </summary>
  7. public class LoggingSetting
  8. {
  9. /// <summary>
  10. /// LoggingMonitor配置
  11. /// </summary>
  12. public MonitorOptions Monitor { get; set; }
  13. /// <summary>
  14. /// 是否日志消息格式化
  15. /// </summary>
  16. public bool MessageFormat { get; set; }
  17. /// <summary>
  18. /// 日志等级
  19. /// </summary>
  20. public LogLevelOptions LogLevel { get; set; }
  21. /// <summary>
  22. /// LoggingMonitor配置
  23. /// </summary>
  24. public class MonitorOptions
  25. {
  26. /// <summary>
  27. /// 写入文件
  28. /// </summary>
  29. public bool Write { get; set; }
  30. /// <summary>
  31. /// 写入控制台
  32. /// </summary>
  33. public bool Console { get; set; }
  34. }
  35. /// <summary>
  36. /// 日志等级
  37. /// </summary>
  38. public class LogLevelOptions
  39. {
  40. /// <summary>
  41. /// 默认日志等级
  42. /// </summary>
  43. public string Default { get; set; }
  44. /// <summary>
  45. /// 最大日志等级
  46. /// </summary>
  47. public string MaxLevel { get; set; } = "Error";
  48. }
  49. }