<?xml version="1.0" encoding="utf-8" ?>
<log4net>
    <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
        <layout type="log4net.Layout.PatternLayout">
            <conversionPattern value="%date %message%newline" />
        </layout>
    </appender>
    <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
        <!--存储到当前的Log文件夹里面-->
        <param name="File" value="./Log/NMS" />
        <!--日志文件名采用日期方式-->
        <param name="DatePattern" value="&quot;Logs_&quot;yyyy-MM-dd&quot;.log&quot;" />
        <param name="AppendToFile" value="true" />
        <param name="RollingStyle" value="Date" />
        <param name="StaticLogFileName" value="false" />
        <layout type="log4net.Layout.PatternLayout">
            <header value="[程序启动]&#xD;&#xA;" />
            <footer value="[程序结束]&#xD;&#xA;===========================================================" />
            <param name="ConversionPattern" value="%n----------------------------------------------------------------%n时间：%d   线程：[%t]  内容： %m" />
        </layout>
    </appender>
    <!-- Setup the root category, add the appenders and set the default level -->
 <!--   <root>
        <level value="ALL" />
        <appender-ref ref="LogFileAppender" />
        <appender-ref ref="RollingLogFileAppender" />
    </root>-->
    <logger name="File.Logging">
        <level value="ALL" />
        <appender-ref ref="RollingLogFileAppender" />
    </logger>
    <logger name="Console.Logging">
        <level value="ALL" />
        <appender-ref ref="ConsoleAppender" />
    </logger>
</log4net>