<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
  </configSections>
  <log4net>
    <!--定义输出到文件中-->
    <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
      <!--定义文件存放位置-->
      <file value="Logs\\" />
      <appendToFile value="true" />
      <rollingStyle value="Date" />
      <datePattern value="yyyy\\yyyy-MM\\yyyy-MM-dd'.txt'" />
      <staticLogFileName value="false" />
      <param name="MaxSizeRollBackups" value="100" />
      <layout type="log4net.Layout.PatternLayout">
        <!--每条日志末尾的文字说明-->
        <!--输出格式-->
        <!--样例：2008-03-26 13:42:32,111 [10] INFO  Log4NetDemo.MainClass [(null)] - info-->
        <conversionPattern value="%n记录时间：%date %n日志级别：%-5level %n信息描述：%message%newline" />
      </layout>
    </appender>
    <root>
      <level value="Fatal" />
      <level value="Error" />
      <level value="Warn" />
      <level value="Info" />
      <level value="Debug" />
      <!--文件形式记录日志-->
      <appender-ref ref="RollingLogFileAppender" />
    </root>
  </log4net>
</configuration>