<configuration>
  <configSections>
    <section name="log4net" type="System.Configuration.IgnoreSectionHandler"/>
  </configSections>
  <appSettings>
  </appSettings>
  <log4net>
    <!--一般信息日志-->
    <appender name="CommonLog" type="log4net.Appender.RollingFileAppender">
      <file value="Log/CommonLog/" />
      <appendToFile value="true" />
      <rollingStyle value="Date" />
      <staticLogFileName value="false" />
      <datePattern value="yyyyMMdd&quot;.log&quot;" />
      <layout type="log4net.Layout.PatternLayout">
        <!--输出格式-->
        <!--<param name="ConversionPattern" value="[%date]-[%thread]-[%-p]-[%logger]-[%M] -> %message%newline" />-->
        <conversionPattern value="[%date]-[%thread]-[%-p] %message%newline" />
      </layout>
      <filter type="log4net.Filter.LoggerMatchFilter">
        <loggerToMatch value="CommonLog" />
      </filter>
      <filter type="log4net.Filter.DenyAllFilter" />
    </appender>
    <!--支付相关日志-->
    <appender name="PayLog" type="log4net.Appender.RollingFileAppender">
      <file value="Log/PayLog/" />
      <appendToFile value="true" />
      <rollingStyle value="Date" />
      <staticLogFileName value="false" />
      <datePattern value="yyyyMMdd&quot;.log&quot;" />
      <layout type="log4net.Layout.PatternLayout">
        <!--输出格式-->
        <conversionPattern value="[%date]-[%thread]-[%-p] %message%newline" />
      </layout>
      <filter type="log4net.Filter.LoggerMatchFilter">
        <loggerToMatch value="PayLog" />
      </filter>
      <filter type="log4net.Filter.DenyAllFilter" />
    </appender>
    <!--BLL层的日志-->
    <appender name="BllLog" type="log4net.Appender.RollingFileAppender">
      <file value="Log/BllLog/" />
      <appendToFile value="true" />
      <rollingStyle value="Date" />
      <staticLogFileName value="false" />
      <datePattern value="yyyyMMdd&quot;.log&quot;" />
      <layout type="log4net.Layout.PatternLayout">
        <!--输出格式-->
        <conversionPattern value="[%date]-[%thread]-[%-p] %message%newline" />
      </layout>
      <filter type="log4net.Filter.LoggerMatchFilter">
        <loggerToMatch value="BllLog" />
      </filter>
      <filter type="log4net.Filter.DenyAllFilter" />
    </appender>

    <!--结帐的日志-->
    <appender name="CheckoutLog" type="log4net.Appender.RollingFileAppender">
      <file value="Log/CheckoutLog/" />
      <appendToFile value="true" />
      <rollingStyle value="Date" />
      <staticLogFileName value="false" />
      <datePattern value="yyyyMMdd&quot;.log&quot;" />
      <layout type="log4net.Layout.PatternLayout">
        <!--输出格式-->
        <conversionPattern value="[%date]-[%thread]-[%-p] %message%newline" />
      </layout>
      <filter type="log4net.Filter.LoggerMatchFilter">
        <loggerToMatch value="CheckoutLog" />
      </filter>
      <filter type="log4net.Filter.DenyAllFilter" />
    </appender>

    <!--数据持久化日志-->
    <appender name="PersistenceLog" type="log4net.Appender.RollingFileAppender">
      <file value="Log/PersistenceLog/" />
      <appendToFile value="true" />
      <rollingStyle value="Date" />
      <staticLogFileName value="false" />
      <datePattern value="yyyyMMdd&quot;.log&quot;" />
      <layout type="log4net.Layout.PatternLayout">
        <!--输出格式-->
        <conversionPattern value="[%date]-[%thread]-[%-p] %message%newline" />
      </layout>
      <filter type="log4net.Filter.LoggerMatchFilter">
        <loggerToMatch value="PersistenceLog" />
      </filter>
      <filter type="log4net.Filter.DenyAllFilter" />
    </appender>
    <root>
      <level value="ALL"/>
      <appender-ref ref="CommonLog"/>
      <appender-ref ref="PayLog"/>
      <appender-ref ref="BllLog"/>
      <appender-ref ref="CheckoutLog"/>
      <appender-ref ref="PersistenceLog"/>
    </root>
  </log4net>
</configuration>