IDebugLogger.cs 2.4 KB

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