<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <log4net threshold="ALL">
    <!-- === Appender for NON-ERROR messages file === -->
    <appender name="DEBUG_APPENDER" type="log4net.Appender.RollingFileAppender">
      <file type="log4net.Util.PatternString" value="%property{AppDataPath}/logs/adminutils/debug-info.txt" />
      <filter type="log4net.Filter.LevelMatchFilter">
        <levelToMatch value="INFO" />
      </filter>
      <filter type="log4net.Filter.DenyAllFilter" />
      <appendToFile value="true" />
      <maxSizeRollBackups value="1" />
      <maximumFileSize value="300KB" />
      <rollingStyle value="Size" />
      <staticLogFileName value="true" />
      <layout type="log4net.Layout.PatternLayout">
        <header type="log4net.Util.PatternString" value="#Software: %property{LoggerName} %newline#Date: %date %newline#Fields: date thread namespace methodname message %newline" />
        <conversionPattern value="%date	[%thread]	%message%newline" />
      </layout>
    </appender>

    <!-- === Appender for ERROR messages file === -->
    <appender name="ERROR_APPENDER" type="log4net.Appender.RollingFileAppender">
      <file type="log4net.Util.PatternString" value="%property{AppDataPath}/logs/adminutils/errors.txt" />
      <filter type="log4net.Filter.LevelMatchFilter">
        <levelToMatch value="ERROR" />
      </filter>
      <filter type="log4net.Filter.DenyAllFilter" />
      <appendToFile value="true" />
      <maxSizeRollBackups value="10" />
      <maximumFileSize value="100KB" />
      <rollingStyle value="Size" />
      <staticLogFileName value="true" />
      <layout type="log4net.Layout.PatternLayout">
        <header type="log4net.Util.PatternString" value="#Software: %property{LoggerName} %newline#Date: %date %newline#Fields: date thread namespace methodname message exception%newline" />
        <conversionPattern value="%date	[%thread]	%-5level	%message%newline" />
      </layout>
    </appender>

    <root>
      <level value="ALL"/>
      <appender-ref ref="DEBUG_APPENDER"/>
      <appender-ref ref="ERROR_APPENDER"/>
    </root>
  </log4net>
</configuration>