You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
|
|
|
<configuration>
|
|
|
|
|
<configSections>
|
|
|
|
|
<section name="log4net" type="System.Configuration.IgnoreSectionHandler"/>
|
|
|
|
|
</configSections>
|
|
|
|
|
<appSettings>
|
|
|
|
|
</appSettings>
|
|
|
|
|
<log4net>
|
|
|
|
|
<!--错误日志类-->
|
|
|
|
|
<logger name="logerror">
|
|
|
|
|
<level value="ALL" />
|
|
|
|
|
<appender-ref ref="ErrorAppender" />
|
|
|
|
|
</logger>
|
|
|
|
|
|
|
|
|
|
<!--信息日志类-->
|
|
|
|
|
<logger name="loginfo">
|
|
|
|
|
<level value="ALL" />
|
|
|
|
|
<appender-ref ref="InfoAppender" />
|
|
|
|
|
</logger>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--错误日志附加介质-->
|
|
|
|
|
<appender name="ErrorAppender" type="log4net.Appender.RollingFileAppender">
|
|
|
|
|
<param name="File" value="Log\" />
|
|
|
|
|
<param name="AppendToFile" value="true" />
|
|
|
|
|
<param name="MaxSizeRollBackups" value="100" />
|
|
|
|
|
<param name="MaxFileSize" value="10240" />
|
|
|
|
|
<param name="StaticLogFileName" value="false" />
|
|
|
|
|
<param name="DatePattern" value='yyyy-MM-dd/"LogError.txt"'/>
|
|
|
|
|
<param name="RollingStyle" value="Date" />
|
|
|
|
|
<layout type="log4net.Layout.PatternLayout">
|
|
|
|
|
<param name="ConversionPattern" value="%n日志时间:%d [%t] %n日志级别:%-5p %n日志内容:%m %n " />
|
|
|
|
|
</layout>
|
|
|
|
|
</appender>
|
|
|
|
|
|
|
|
|
|
<!--信息日志附加介质-->
|
|
|
|
|
<appender name="InfoAppender" type="log4net.Appender.RollingFileAppender">
|
|
|
|
|
<param name="File" value="Log\" />
|
|
|
|
|
<param name="AppendToFile" value="true" />
|
|
|
|
|
<param name="MaxFileSize" value="10240" />
|
|
|
|
|
<param name="MaxSizeRollBackups" value="100" />
|
|
|
|
|
<param name="StaticLogFileName" value="false" />
|
|
|
|
|
<param name="DatePattern" value='yyyy-MM-dd/"LogInfo.txt"' />
|
|
|
|
|
<param name="RollingStyle" value="Date" />
|
|
|
|
|
<!--信息日志布局-->
|
|
|
|
|
<layout type="log4net.Layout.PatternLayout">
|
|
|
|
|
<param name="ConversionPattern" value="%n日志时间:%d [%t] %n日志级别:%-5p %n日志内容:%m %n " />
|
|
|
|
|
</layout>
|
|
|
|
|
</appender>
|
|
|
|
|
</log4net>
|
|
|
|
|
</configuration>
|