<?xml version="1.0" encoding="utf-8" ?>

<!-- .NET application configuration file -->

<configuration>

  <!-- This section contains the log4net configuration settings -->

  <log4net>

    <!-- Define some output appenders -->

    <appender name="LogFileAppender" type="log4net.Appender.FileAppender" >

      <file value="log-file.txt" />

      <appendToFile value="true" />

      <layout type="log4net.Layout.PatternLayout">

        <conversionPattern value="%date [%-5level] - %message%newline" /> <!--输出格式-->

      </layout>

    </appender>

    <appender name="DebugAppender" type="log4net.Appender.DebugAppender">

      <layout type="log4net.Layout.PatternLayout">

        <conversionPattern value="%date [%-5level] - %message%newline" />

      </layout>

    </appender>

    <!-- Setup the root category, add the appenders

           and set the default level -->

    <root>

      <level value="ERROR" />

      <appender-ref ref="DebugAppender" />

      <appender-ref ref="LogFileAppender" />

    </root>

  </log4net>

</configuration>
