<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="log4net" type="System.Configuration.IgnoreSectionHandler" />
  </configSections>
  <appSettings>
    <!--
    <add key="log4net.configuration.file" value="log4net.xml"/>
    -->
  </appSettings>
  <log4net>
    <!-- http://logging.apache.org/log4net/release/manual/introduction.html#HC-22669032 -->
    <appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
      <file value="../sample.log" />
      <appendToFile value="true" />
      <maximumFileSize value="100KB" />
      <maxSizeRollBackups value="2" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%d [%t] %l - %m%n" />
      </layout>
    </appender>
    <appender name="ColoredConsoleAppender" type="log4net.Appender.ColoredConsoleAppender">
      <!--
	    <mapping>
		    <level value="ERROR" />
		    <foreColor value="RED" />
		    <level value="INFO" />
		    <foreColor value="Green" />
	    </mapping>
	    -->
      <threshold value="INFO"/>
	    <layout type="log4net.Layout.PatternLayout">
		    <conversionPattern value="%d{HH:mm:ss,fff} %-5p %c{2}(line:%L) - %m%n" />
	    </layout>
    </appender>
    <appender name="OutputDebugString" type="log4net.Appender.OutputDebugStringAppender">
      <layout type="log4net.Layout.PatternLayout">
        <!-- <conversionPattern value="%t %l - %m%n" /> -->
        <conversionPattern value="%d{HH:mm:ss,fff} %-5p %c{2}(line:%L) - %m%n" />
      </layout>
    </appender>
    <root>
      <level value="OFF" />
      <appender-ref ref="RollingFile" />
      <appender-ref ref="OutputDebugString" />
      <appender-ref ref="ColoredConsoleAppender" />      
    </root>
	  <logger name="Spring.Services.WindowsService.Samples">
		  <level value="ALL" />
	  </logger>
  </log4net>
</configuration>