IDebugLogger.cs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using System.Diagnostics.CodeAnalysis;
  2. namespace Wayne.Lib.Log
  3. {
  4. /// <summary>
  5. /// Debug logger
  6. /// </summary>
  7. public interface IDebugLogger
  8. {
  9. /// <summary>
  10. /// Tells whether the default category is active in the Normal level.
  11. /// </summary>
  12. bool IsActive();
  13. /// <summary>
  14. /// Tells whether the given category is active in the Normal level.
  15. /// </summary>
  16. bool IsActive(object category);
  17. /// <summary>
  18. /// Tells whether the default category is active in the given level.
  19. /// </summary>
  20. bool IsActive(DebugLogLevel debugLogLevel);
  21. /// <summary>
  22. /// Tells whether the given category is active in the given level.
  23. /// </summary>
  24. bool IsActive(object category, DebugLogLevel debugLogLevel);
  25. /// <summary>
  26. /// Adds a new object to the debug log entry.
  27. /// </summary>
  28. /// <param name="obj">The log object that are added.</param>
  29. [SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "obj")]
  30. void Add(object obj);
  31. /// <summary>
  32. /// Adds a new object to the debug log entry.
  33. /// </summary>
  34. /// <param name="obj">The log object that are added.</param>
  35. /// <param name="level">TDB</param>
  36. [SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "obj")]
  37. void Add(object obj, DebugLogLevel level);
  38. /// <summary>
  39. /// Adds a new object to the debug log entry.
  40. /// </summary>
  41. /// <param name="obj">The log object that are added.</param>
  42. /// <param name="category">A specific category that this log is about.</param>
  43. [SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "obj")]
  44. void Add(object obj, object category);
  45. /// <summary>
  46. /// Adds a new object to the debug log entry.
  47. /// </summary>
  48. /// <param name="obj">The log object that are added.</param>
  49. /// <param name="category">A specific category that this log is about.</param>
  50. /// <param name="level">TDB</param>
  51. [SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "obj")]
  52. void Add(object obj, object category, DebugLogLevel level);
  53. }
  54. }