ILogger.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace BestHTTP.Logger
  6. {
  7. /// <summary>
  8. /// Available logging levels.
  9. /// </summary>
  10. public enum Loglevels : byte
  11. {
  12. /// <summary>
  13. /// All message will be logged.
  14. /// </summary>
  15. All,
  16. /// <summary>
  17. /// Only Informations and above will be logged.
  18. /// </summary>
  19. Information,
  20. /// <summary>
  21. /// Only Warnings and above will be logged.
  22. /// </summary>
  23. Warning,
  24. /// <summary>
  25. /// Only Errors and above will be logged.
  26. /// </summary>
  27. Error,
  28. /// <summary>
  29. /// Only Exceptions will be logged.
  30. /// </summary>
  31. Exception,
  32. /// <summary>
  33. /// No logging will occur.
  34. /// </summary>
  35. None
  36. }
  37. public interface ILogger
  38. {
  39. /// <summary>
  40. /// The minimum severity to log
  41. /// </summary>
  42. Loglevels Level { get; set; }
  43. string FormatVerbose { get; set; }
  44. string FormatInfo { get; set; }
  45. string FormatWarn { get; set; }
  46. string FormatErr { get; set; }
  47. string FormatEx { get; set; }
  48. void Verbose(string division, string verb);
  49. void Information(string division, string info);
  50. void Warning(string division, string warn);
  51. void Error(string division, string err);
  52. void Exception(string division, string msg, Exception ex);
  53. }
  54. }