<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
  </configSections>

  <log4net>
    <logger name="loginfo">
      <level value="INFO" />
      <appender-ref ref="InfoAppender" />
    </logger>
    
    <logger name="logReportFile">
      <level value="INFO" />
      <appender-ref ref="ReportFileAppender" />
    </logger>
    
    <!--<logger name="logdebug">
      <level value="DEBUG" />
      <appender-ref ref="DebugAppender" />
    </logger>-->
    
    <!--<logger name="logwarn">
      <level value="WARN" />
      <appender-ref ref="WarnAppender" />
    </logger>-->
    
    <!--<logger name="logerror">
      <level value="ERROR" />
      <appender-ref ref="ErrorAppender" />
    </logger>-->
    
    <!--<logger name="logfatal">
      <level value="FATAL" />
      <appender-ref ref="FatalAppender" />
    </logger>-->
    
    <!--<logger name="logapi">
      <level value="INFO" />
      <appender-ref ref="ApiAppender" />
    </logger>-->
    
    <!--<logger name="logfiliale">
      <level value="INFO" />
      <appender-ref ref="FilialeAppender" />
    </logger>-->


    <!--ReportFileAppender 日志-->
    <appender name="ReportFileAppender" type="log4net.Appender.RollingFileAppender">
      <!--日志路径-->
      <param name= "File" value= "log\\"/>
      <!--是否是向文件中追加日志-->
      <param name= "AppendToFile" value= "true"/>
      <!--log保留天数-->
      <param name= "MaxSizeRollBackups" value= "10"/>
      <!--日志文件名是否是固定不变的-->
      <param name= "StaticLogFileName" value= "false"/>
      <!--日志文件名格式为:2017-08-19.log-->
      <datePattern value="'ReportFileConvert'\\yyyyMMdd'.txt'"/>
      <!--日志根据日期滚动-->
      <param name= "RollingStyle" value= "Date"/>
      <layout type="log4net.Layout.PatternLayout">
        <param name="ConversionPattern" value="%d:%m%n"/>
      </layout>
    </appender>
    
    <!--Info 日志-->
    <appender name="InfoAppender" type="log4net.Appender.RollingFileAppender">
      <!--日志路径-->
      <param name= "File" value= "log\\"/>
      <!--是否是向文件中追加日志-->
      <param name= "AppendToFile" value= "true"/>
      <!--log保留天数-->
      <param name= "MaxSizeRollBackups" value= "10"/>
      <!--日志文件名是否是固定不变的-->
      <param name= "StaticLogFileName" value= "false"/>
      <!--日志文件名格式为:2017-08-19.log-->
      <datePattern value="yyyyMM\\yyyyMMdd'.txt'"/>
      <!--日志根据日期滚动-->
      <param name= "RollingStyle" value= "Date"/>
      <layout type="log4net.Layout.PatternLayout">
        <param name="ConversionPattern" value="%d:%m%n"/>
      </layout>
    </appender>

    <!--Debug 日志-->
    <appender name="DebugAppender" type="log4net.Appender.RollingFileAppender">
      <!--日志路径-->
      <param name= "File" value= "log\\"/>
      <!--是否是向文件中追加日志-->
      <param name= "AppendToFile" value= "true"/>
      <!--log保留天数-->
      <param name= "MaxSizeRollBackups" value= "10"/>
      <!--日志文件名是否是固定不变的-->
      <param name= "StaticLogFileName" value= "false"/>
      <!--日志文件名格式为:2017-08-19.log-->
      <datePattern value="yyyyMM\\yyyyMMdd'.Debug.txt'"/>
      <!--日志根据日期滚动-->
      <param name= "RollingStyle" value= "Date"/>
      <layout type="log4net.Layout.PatternLayout">
        <param name="ConversionPattern" value="Time:%d %nContent:%m%n-----------------------------------------%n%n"/>
      </layout>
    </appender>
    
    <!--Error 日志-->
    <appender name="ErrorAppender" type="log4net.Appender.RollingFileAppender">
      <!--日志路径-->
      <param name= "File" value= "log\\"/>
      <!--是否是向文件中追加日志-->
      <param name= "AppendToFile" value= "true"/>
      <!--log保留天数-->
      <param name= "MaxSizeRollBackups" value= "10"/>
      <!--日志文件名是否是固定不变的-->
      <param name= "StaticLogFileName" value= "false"/>
      <!--日志文件名格式为:2017-08-19.log-->
      <datePattern value="yyyyMM\\yyyyMMdd'.Error.txt'"/>
      <!--日志根据日期滚动-->
      <param name= "RollingStyle" value= "Date"/>
      <layout type="log4net.Layout.PatternLayout">
        <param name="ConversionPattern" value="Time:%d :%m%n"/>
      </layout>
    </appender>
    
    <!--Filiale 日志-->
    <appender name="FilialeAppender" type="log4net.Appender.RollingFileAppender">
      <!--日志路径-->
      <param name= "File" value= "log\\"/>
      <!--是否是向文件中追加日志-->
      <param name= "AppendToFile" value= "true"/>
      <!--log保留天数-->
      <param name= "MaxSizeRollBackups" value= "10"/>
      <!--日志文件名是否是固定不变的-->
      <param name= "StaticLogFileName" value= "false"/>
      <!--日志文件名格式为:2017-08-19.log-->
      <datePattern value="yyyyMM\\yyyyMMdd'.Filiale.txt'"/>
      <!--日志根据日期滚动-->
      <param name= "RollingStyle" value= "Date"/>
      <layout type="log4net.Layout.PatternLayout">
        <!--<param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />-->
        <param name="ConversionPattern" value="Time:%d%n %m%n-----------------------------------------%n%n"/>
      </layout>
    </appender>

    <!-- 控制台前台显示日志 -->
    <appender name="ColoredConsoleAppender" type="log4net.Appender.ColoredConsoleAppender">
      <mapping>
        <level value="ERROR" />
        <foreColor value="Red, HighIntensity" />
      </mapping>
      <mapping>
        <level value="Info" />
        <foreColor value="Green" />
      </mapping>
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%n%date{HH:mm:ss,fff} [%-5level] %m" />
      </layout>


    </appender>

  </log4net>
  
</configuration>