|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?xml version="1.0" encoding="utf-8" ?>
- <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\\LogError\\" />
-
- <param name="AppendToFile" value="true" />
-
- <param name="MaxSizeRollBackups" value="100" />
-
- <param name="MaxFileSize" value="10240" />
-
- <param name="StaticLogFileName" value="false" />
-
- <param name="DatePattern" value="yyyyMMdd".htm"" />
-
- <param name="RollingStyle" value="Date" />
-
-
- <layout type="log4net.Layout.PatternLayout">
- <param name="ConversionPattern" value="<HR COLOR=red>%n异常时间:%d [%t] <BR>%n异常级别:%-5p <BR>%n异 常 类:%c [%x] <BR>%n%m <BR>%n <HR Size=1>" />
- </layout>
- </appender>
-
- <appender name="InfoAppender" type="log4net.Appender.RollingFileAppender">
- <param name="File" value="Log\\LogInfo\\" />
- <param name="AppendToFile" value="true" />
- <param name="MaxFileSize" value="10240" />
- <param name="MaxSizeRollBackups" value="100" />
- <param name="StaticLogFileName" value="false" />
- <param name="DatePattern" value="yyyyMMdd".htm"" />
- <param name="RollingStyle" value="Date" />
-
- <layout type="log4net.Layout.PatternLayout">
- <param name="ConversionPattern" value="<HR COLOR=blue>%n日志时间:%d [%t] <BR>%n日志级别:%-5p <BR>%n日 志 类:%c [%x] <BR>%n%m <BR>%n <HR Size=1>" />
- </layout>
- </appender>
- </log4net>
|