平安校园
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.
 
 
 
 
 
 

65 lines
1.1 KiB

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