/ Published in: XML
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<log4net> <logger name="logger"> <!--Loggers may be assigned levels. Levels are instances of the log4net.Core.Level class. The following levels are defined in order of increasing priority: * ALL * DEBUG * INFO * WARN * ERROR * FATAL * OFF--> <level value="ERROR"/> <appender-ref ref="RollingLogFileAppender" /> <appender-ref ref="TraceAppender" /> </logger> <appender name="TraceAppender" type="log4net.Appender.TraceAppender"> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" /> </layout> </appender> <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender,log4net"> <param name="File" value="diagnostics.log" /> <param name="AppendToFile" value="true" /> <param name="MaxSizeRollBackups" value="10" /> <param name="MaximumFileSize" value="5MB" /> <param name="RollingStyle" value="Size" /> <param name="StaticLogFileName" value="true" /> <layout type="log4net.Layout.PatternLayout,log4net"> <header value="******************************************************
********************* START **************************
******************************************************
" /> <footer value="*********************** END **************************

" /> <param name="ConversionPattern" value="%d [%t] %-5p %c [%x] - %m%n" /> </layout> </appender> </log4net>