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.

27 lines
1.2 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Diagnostics;
  4. namespace Newtonsoft.Json.Serialization
  5. {
  6. /// <summary>
  7. /// Represents a trace writer.
  8. /// </summary>
  9. internal interface ITraceWriter
  10. {
  11. /// <summary>
  12. /// Gets the <see cref="TraceLevel"/> that will be used to filter the trace messages passed to the writer.
  13. /// For example a filter level of <see cref="TraceLevel.Info"/> will exclude <see cref="TraceLevel.Verbose"/> messages and include <see cref="TraceLevel.Info"/>,
  14. /// <see cref="TraceLevel.Warning"/> and <see cref="TraceLevel.Error"/> messages.
  15. /// </summary>
  16. /// <value>The <see cref="TraceLevel"/> that will be used to filter the trace messages passed to the writer.</value>
  17. TraceLevel LevelFilter { get; }
  18. /// <summary>
  19. /// Writes the specified trace level, message and optional exception.
  20. /// </summary>
  21. /// <param name="level">The <see cref="TraceLevel"/> at which to write this trace.</param>
  22. /// <param name="message">The trace message.</param>
  23. /// <param name="ex">The trace exception. This parameter is optional.</param>
  24. void Trace(TraceLevel level, string message, Exception ex);
  25. }
  26. }