DebugLogEntry.cs 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. using System.Diagnostics.CodeAnalysis;
  2. namespace Wayne.Lib.Log
  3. {
  4. /// <summary>
  5. /// A Debug LogEntry.
  6. /// </summary>
  7. public class DebugLogEntry : LogEntry
  8. {
  9. #region Constructors
  10. /// <summary>
  11. /// Constructor.
  12. /// </summary>
  13. /// <param name="entity">The entity that performed the logging.</param>
  14. /// <param name="logObject">The object to log.</param>
  15. [SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "object")]
  16. public DebugLogEntry(IIdentifiableEntity entity, object logObject)
  17. : base(entity, logObject, string.Empty)
  18. {
  19. LogLevel = DebugLogLevel.Normal;
  20. }
  21. /// <summary>
  22. /// Constructor.
  23. /// </summary>
  24. /// <param name="entity">The entity that performed the logging.</param>
  25. /// <param name="logObject">The object to log.</param>
  26. /// <param name="logLevel">The log level.</param>
  27. [SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "object")]
  28. public DebugLogEntry(IIdentifiableEntity entity, object logObject, DebugLogLevel logLevel)
  29. : base(entity, logObject, string.Empty)
  30. {
  31. LogLevel = logLevel;
  32. }
  33. /// <summary>
  34. /// Constructor.
  35. /// </summary>
  36. /// <param name="entity">The entity that performed the logging.</param>
  37. /// <param name="logObject">The object to log.</param>
  38. /// <param name="category">The category of the log object.</param>
  39. [SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "object")]
  40. public DebugLogEntry(IIdentifiableEntity entity, object logObject, object category)
  41. : base(entity, logObject, category)
  42. {
  43. LogLevel = DebugLogLevel.Normal;
  44. }
  45. /// <summary>
  46. /// Constructor.
  47. /// </summary>
  48. /// <param name="entity">The entity that performed the logging.</param>
  49. /// <param name="logObject">The object to log.</param>
  50. /// <param name="category">The category of the log object.</param>
  51. /// <param name="logLevel">The log level.</param>
  52. [SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "object")]
  53. public DebugLogEntry(IIdentifiableEntity entity, object logObject, object category, DebugLogLevel logLevel)
  54. : base(entity, logObject, category)
  55. {
  56. LogLevel = logLevel;
  57. }
  58. #endregion
  59. #region Properties
  60. /// <summary>
  61. /// The log level.
  62. /// </summary>
  63. public DebugLogLevel LogLevel { get; private set; }
  64. #endregion
  65. }
  66. }