log4net.config 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <log4net>
  3. <appender name="errorAppender" type="log4net.Appender.RollingFileAppender">
  4. <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
  5. <filter type="log4net.Filter.LevelMatchFilter">
  6. <levelToMatch value="ERROR" />
  7. </filter>
  8. <filter type="log4net.Filter.DenyAllFilter" />
  9. <file value="../log/10001/err.log" />
  10. <encoding value="utf-8" />
  11. <preserveLogFileNameExtension value="true" />
  12. <appendToFile value="true" />
  13. <rollingStyle value="Composite" />
  14. <maxSizeRollBackups value="100" />
  15. <maximumFileSize value="256MB" />
  16. <datePattern value="yyyyMMdd" />
  17. <layout type="log4net.Layout.PatternLayout">
  18. <conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
  19. </layout>
  20. </appender>
  21. <appender name="warnAppender" type="log4net.Appender.RollingFileAppender">
  22. <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
  23. <filter type="log4net.Filter.LevelMatchFilter">
  24. <levelToMatch value="WARN" />
  25. </filter>
  26. <filter type="log4net.Filter.DenyAllFilter" />
  27. <file value="../log/10001/warn.log" />
  28. <encoding value="utf-8" />
  29. <preserveLogFileNameExtension value="true" />
  30. <appendToFile value="true" />
  31. <rollingStyle value="Composite" />
  32. <maxSizeRollBackups value="100" />
  33. <maximumFileSize value="256MB" />
  34. <datePattern value="yyyyMMdd" />
  35. <layout type="log4net.Layout.PatternLayout">
  36. <conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
  37. </layout>
  38. </appender>
  39. <appender name="infoAppender" type="log4net.Appender.RollingFileAppender">
  40. <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
  41. <filter type="log4net.Filter.LevelMatchFilter">
  42. <levelToMatch value="INFO" />
  43. </filter>
  44. <filter type="log4net.Filter.DenyAllFilter" />
  45. <file value="../log/10001/info.log" />
  46. <encoding value="utf-8" />
  47. <preserveLogFileNameExtension value="true" />
  48. <appendToFile value="true" />
  49. <rollingStyle value="Composite" />
  50. <maxSizeRollBackups value="100" />
  51. <maximumFileSize value="256MB" />
  52. <datePattern value="yyyyMMdd" />
  53. <layout type="log4net.Layout.PatternLayout">
  54. <conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
  55. </layout>
  56. </appender>
  57. <appender name="debugAppender" type="log4net.Appender.RollingFileAppender">
  58. <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
  59. <filter type="log4net.Filter.LevelMatchFilter">
  60. <levelToMatch value="DEBUG" />
  61. </filter>
  62. <filter type="log4net.Filter.DenyAllFilter" />
  63. <file value="../log/10001/debug.log" />
  64. <encoding value="utf-8" />
  65. <preserveLogFileNameExtension value="true" />
  66. <appendToFile value="true" />
  67. <rollingStyle value="Composite" />
  68. <maxSizeRollBackups value="100" />
  69. <maximumFileSize value="256MB" />
  70. <datePattern value="yyyyMMdd" />
  71. <layout type="log4net.Layout.PatternLayout">
  72. <conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
  73. </layout>
  74. </appender>
  75. <root>
  76. <level value="ALL" />
  77. <appender-ref ref="errorAppender" />
  78. <appender-ref ref="warnAppender" />
  79. <appender-ref ref="infoAppender" />
  80. <appender-ref ref="debugAppender" />
  81. </root>
  82. </log4net>