LoggingLevel.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. namespace NModbus
  2. {
  3. /// <summary>
  4. /// Following the guidelines from https://github.com/aspnet/Logging/wiki/Guidelines.
  5. /// </summary>
  6. public enum LoggingLevel
  7. {
  8. /// <summary>
  9. /// The most detailed log messages, may contain sensitive application data. These messages should be disabled by default and should never be enabled in a production environment.
  10. /// </summary>
  11. Trace = 0,
  12. /// <summary>
  13. /// Logs that are used for interactive investigation during development should use the Debug level. These logs should primarily contain information useful for debugging and have no long-term value.
  14. /// This is the default most verbose level of logging.
  15. /// </summary>
  16. Debug = 1,
  17. /// <summary>
  18. /// Track the general flow of the application using logs at the Information level. These logs should have value in the long term.
  19. /// </summary>
  20. Information = 2,
  21. /// <summary>
  22. /// Warnings should highlight an abnormal or unexpected event in the application flow. This event does not cause the application execution to stop, but can signify sub-optimal performance or a potential problem for the future. A common place to log a warning is from handled exceptions.
  23. /// </summary>
  24. Warning = 3,
  25. /// <summary>
  26. /// An error should be logged when the current flow of execution is stopped due to a failure. These should indicate a failure in the current activity, not an application-wide failure. These will mainly be unhandled exceptions and recoverable failures.
  27. /// </summary>
  28. Error = 4,
  29. /// <summary>
  30. /// A critical log should describe an unrecoverable application or system crash, or a catastrophic failure that requires immediate attention.
  31. /// </summary>
  32. Critical = 5
  33. }
  34. }