<?xml version="1.0" encoding="utf-8"?>
<!-- V8.24.1.3 M202003040969 liyh 20200304 日志文件采用不同名称-->
<!-- V8.24.1.2 M201912160090 liyh 20191216 DEBUG TRACE 级别不再落日志文件 所有级别落控制台-->
<!-- V8.24.1.1 20181218 李亚会  BL2018SP3-->
<configuration>
  <configSections>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
  </configSections>
  <!--FATAL、ERROR、WARN、INFO、DEBUG、TRACE、 ALL-->
  <log4net debug="false">
    <logger name="Log">
      <level value="ERROR" />
      <appender-ref ref="ConsoleAppender" />
    </logger>

    <logger name="logbusiness">
      <level value="INFO" />
      <appender-ref ref="BusinessAppender" />
      <appender-ref ref="ConsoleAppender" />
    </logger>
    <logger name="logsystem">
      <level value="ALL" />
      <appender-ref ref="SystemAppender" />
      <appender-ref ref="ConsoleAppender" />
    </logger>

    <appender name="SystemAppender" type="log4net.Appender.RollingFileAppender">
      <file value="Log\{0}\LogSys\" />
      <!--多线程时采用最小锁定-->
      <lockingModel type="log4net.Appender.FileAppender+MinimalLock"/>
      <Encoding value="UTF-8" />
	  <!--BufferSize为缓冲区大小，只有日志记录超设定值才会一块写入-->
	  <param name="BufferSize" value="1024"/>
      <!--支持文件续写-->
	  <param name="AppendToFile" value="true" />
	  <!-- 切割最多文件数 -1表示不限制产生日志文件数-->       
	  <param name="MaxSizeRollBackups" value="-1"/>
	  <!-- 每个文件的大小限制  -->
      <param name="MaximumFileSize" value="5MB"/>
	  <!-- RollingStyle Composite 综合  Size 按大小  Date 按时间 -->
      <param name="RollingStyle" value="Composite" />
      <param name="StaticLogFileName" value="false"/>
      <datePattern value="&quot;Sys-&quot;yyyyMMdd&quot;.log&quot;" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="{%date}{%thread}{%-5level}%message%newline" />
      </layout>  
      <filter type="log4net.Filter.LevelRangeFilter">
        <param name="LevelMin" value="INFO" />
        <param name="LevelMax" value="FATAL" />
        <AcceptOnMatch value="true"/>
      </filter>
    </appender>
    
    <appender name="BusinessAppender" type="log4net.Appender.RollingFileAppender">
      <file value="Log\{0}\LogBusi\" />
      <!--多线程时采用最小锁定-->
      <lockingModel type="log4net.Appender.FileAppender+MinimalLock"/>
      <Encoding value="UTF-8" />
	  <!--BufferSize为缓冲区大小，只有日志记录超设定值才会一块写入-->
	  <param name="BufferSize" value="1024"/>
      <!--支持文件续写-->
	  <param name="AppendToFile" value="true" />
	  <!-- 切割最多文件数 -1表示不限制产生日志文件数-->       
	  <param name="MaxSizeRollBackups" value="-1"/>
	  <!-- 每个文件的大小限制  -->
      <param name="MaximumFileSize" value="5MB"/>
	  <!-- RollingStyle Composite 综合  Size 按大小  Date 按时间 -->
      <param name="RollingStyle" value="Composite" />
      <param name="StaticLogFileName" value="false"/>
      <datePattern value="&quot;Busi-&quot;yyyyMMdd&quot;.log&quot;" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="{%date}{%thread}{%-5level}%message%newline" />
      </layout>
    </appender>

    <appender name="ConsoleAppender"  type="log4net.Appender.ConsoleAppender" >
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="{%date}{%thread}{%-5level}%message%newline" />
      </layout>
    </appender>
  </log4net>
</configuration>
