<?xml version="1.0" encoding="utf-8"?>
<configuration>

  <configSections>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
  </configSections>
    <startup>  
      <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
    </startup>
    <runtime>
      <legacyUnhandledExceptionPolicy enabled="true"/>
    </runtime>

  <log4net>
    <logger name="Log">
      <level value="INFO" />
      <appender-ref ref="RollingLog" />
    </logger>
    <logger name="Err">
      <level value="ERROR" />
      <appender-ref ref="RollingErr" />
    </logger>
    <logger name="HmiInfo">
      <level value="INFO" />
      <appender-ref ref="HmiRollingLog" />
    </logger>

    <appender name="RollingLog" type="log4net.Appender.RollingFileAppender">
      <file value="..\GC_User\Logs\InfoLog_" />
      <appendToFile value="true" />
      <rollingStyle value="Date" />
      <datePattern value="yyyyMMdd'.txt'" />
      <staticLogFileName value="false" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="Record Time：%d Thread ID:[%thread]- Info：%m%n" />
      </layout>
      <filter type="log4net.Filter.LevelRangeFilter">
        <param name="LevelMin" value="INFO" />
        <param name="LevelMax" value="INFO" />
      </filter>
    </appender>

    <appender name="HmiRollingLog" type="log4net.Appender.RollingFileAppender">
      <file value="..\GC_User\Logs\HmiLog_" />
      <appendToFile value="true" />
      <rollingStyle value="Date" />
      <datePattern value="yyyyMMdd'.txt'" />
      <staticLogFileName value="false" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="Record Time：%d Info：%m%n" />
      </layout>
      <filter type="log4net.Filter.LevelRangeFilter">
        <param name="LevelMin" value="INFO" />
        <param name="LevelMax" value="INFO" />
      </filter>
    </appender>

    <appender name="RollingErr" type="log4net.Appender.RollingFileAppender">
      <file value="..\GC_User\Logs\ErrLog_" />
      <appendToFile value="true" />
      <rollingStyle value="Date" />
      <datePattern value="yyyyMMdd'.txt'" />
      <staticLogFileName value="false" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="Record Time：%d Thread ID:[%thread]- Error：%m%n" />
      </layout>
      <filter type="log4net.Filter.LevelRangeFilter">
        <param name="LevelMin" value="ERROR" />
        <param name="LevelMax" value="ERROR" />
      </filter>
    </appender>
  </log4net>

</configuration>
