<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
  </configSections>
  <log4net>
    <!--按日期分割日志文件 一天一个-->
    <appender name="LogFileAppenderByDate" type="log4net.Appender.RollingFileAppender">
      <!--是否续写-->
      <param name="AppendToFile" value="true" />
      <!--最小锁定模型以允许多个进程可以写入同一个文件-->
      <param name="LockingModel" value="log4net.Appender.FileAppender.MinimalLock" />
      <param name="StaticLogFileName" value="true" />
      <!--保存路径-->
      <param name="File" value="Log\" />
      <param name="DatePattern" value="yyyy-MM-dd.LOG" />
      <param name="StaticLogFileName" value="false" />
      <param name="RollingStyle" value="Date" />
      <layout type="log4net.Layout.PatternLayout">
        <param name="ConversionPattern" value="%n-----------------------------------------%n时间:%d %n级别:%level %n类名:%c%n文件:%F 第%L行%n日志内容:%m%n-----------------------------------------%n%n" />
      </layout>
    </appender>
    <root>
      <!--文件形式记录日志-->
      <appender-ref ref="LogFileAppenderByDate" />
    </root>
  </log4net>
</configuration>