The next generation of the Teknik Services. Written in ASP.NET.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

LoggingConfig.cs 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. namespace Teknik.Configuration
  6. {
  7. public class LoggingConfig
  8. {
  9. public bool Enabled { get; set; }
  10. public string OutputDirectory { get; set; }
  11. public string LogLevel { get; set; }
  12. public bool RotateLogs { get; set; }
  13. public long MaxSize { get; set; }
  14. public int MaxCount { get; set; }
  15. public bool SendEmail { get; set; }
  16. public string EmailLevel { get; set; }
  17. public EmailAccount SenderAccount { get; set; }
  18. public string RecipientEmailAddress { get; set; }
  19. public LoggingConfig()
  20. {
  21. SetDefaults();
  22. }
  23. public void SetDefaults()
  24. {
  25. Enabled = true;
  26. OutputDirectory = string.Empty;
  27. LogLevel = "Info";
  28. RotateLogs = false;
  29. MaxSize = -1;
  30. MaxCount = -1;
  31. SendEmail = false;
  32. EmailLevel = "Error";
  33. SenderAccount = new EmailAccount();
  34. RecipientEmailAddress = string.Empty;
  35. }
  36. }
  37. }