<?xml version="1.0" encoding="utf-8"?>
<log4net>
  <root>
    <!--控制级别，由低到高: ALL|DEBUG|INFO|WARN|ERROR|FATAL|OFF-->
    <!--比如定义级别为INFO，则INFO级别向下的级别，比如DEBUG日志将不会被记录-->
    <!--如果没有定义LEVEL的值，则缺省为DEBUG-->
    <level value="All" />
    <appender-ref ref="InfoAppender" />
    <appender-ref ref="DebugAppender" />
    <appender-ref ref="WarnAppender" />
    <appender-ref ref="ErrorAppender" />
    <appender-ref ref="FATALAppender" />
  </root>
  <!--一般信息-->
  <appender name="InfoAppender" type="log4net.Appender.RollingFileAppender">
    <!--定义文件存放位置-->
    <file value="Temp\\Log\\Info"/>
    <appendToFile value="true"/>
    <rollingStyle value="Date"/>
    <datePattern value="yyyyMM'.log'"/>
    <staticLogFileName value="false"/>
    <param name="MaximumFileSiez" value="1MB"/>
    <param name="MaxSizeRollBackups" value="100"/>
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%date %newline %message %newline %newline"/>
    </layout>
    <filter type="log4net.Filter.LevelRangeFilter">
      <param name="LevelMin" value="INFO" />
      <param name="LevelMax" value="INFO" />
    </filter>
  </appender>
  <!--调试信息-->
  <appender name="DebugAppender" type="log4net.Appender.RollingFileAppender">
    <!--定义文件存放位置-->
    <file value="Temp\\Log\\Debug"/>
    <appendToFile value="true"/>
    <rollingStyle value="Date"/>
    <datePattern value="yyyyMM'.log'"/>
    <staticLogFileName value="false"/>
    <param name="MaximumFileSiez" value="1MB"/>
    <param name="MaxSizeRollBackups" value="100"/>
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%date %newline %message %newline %newline"/>
    </layout>
    <filter type="log4net.Filter.LevelRangeFilter">
      <param name="LevelMin" value="DEBUG" />
      <param name="LevelMax" value="DEBUG" />
    </filter>
  </appender>
  <!--错误信息-->
  <appender name="ErrorAppender" type="log4net.Appender.RollingFileAppender">
    <!--定义文件存放位置-->
    <file value="Temp\\Log\\Error"/>
    <appendToFile value="true"/>
    <rollingStyle value="Date"/>
    <datePattern value="yyyyMM'.log'"/>
    <staticLogFileName value="false"/>
    <param name="MaximumFileSiez" value="1MB"/>
    <param name="MaxSizeRollBackups" value="100"/>
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%date %newline %message %newline %newline"/>
    </layout>
    <filter type="log4net.Filter.LevelRangeFilter">
      <param name="LevelMin" value="ERROR" />
      <param name="LevelMax" value="ERROR" />
    </filter>
  </appender>
  <!--警告信息-->
  <appender name="WarnAppender" type="log4net.Appender.RollingFileAppender">
    <!--定义文件存放位置-->
    <file value="Temp\\Log\\Warn"/>
    <appendToFile value="true"/>
    <rollingStyle value="Date"/>
    <datePattern value="yyyyMM'.log'"/>
    <staticLogFileName value="false"/>
    <param name="MaximumFileSiez" value="1MB"/>
    <param name="MaxSizeRollBackups" value="100"/>
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%date %newline %message %newline %newline"/>
    </layout>
    <filter type="log4net.Filter.LevelRangeFilter">
      <param name="LevelMin" value="WARN" />
      <param name="LevelMax" value="WARN" />
    </filter>
  </appender>
  <!--异常信息-->
  <appender name="FATALAppender" type="log4net.Appender.RollingFileAppender">
    <!--定义文件存放位置-->
    <file value="Temp\\Log\\Fatal"/>
    <appendToFile value="true"/>
    <rollingStyle value="Date"/>
    <datePattern value="yyyyMM'.log'"/>
    <staticLogFileName value="false"/>
    <param name="MaximumFileSiez" value="1MB"/>
    <param name="MaxSizeRollBackups" value="100"/>
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%date %newline %message %newline %newline"/>
    </layout>
    <filter type="log4net.Filter.LevelRangeFilter">
      <param name="LevelMin" value="FATAL" />
      <param name="LevelMax" value="FATAL" />
    </filter>
  </appender>
</log4net>
