Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

67 lines (66 sloc) 2.69 kb
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
</configSections>
<log4net>
<appender name="ColoredConsoleAppender" type="log4net.Appender.ColoredConsoleAppender">
<mapping>
<level value="ERROR"/>
<foreColor value="White, HighIntensity"/>
<backColor value="Red"/>
</mapping>
<mapping>
<level value="WARN"/>
<foreColor value="Red"/>
<backColor value="Yellow, HighIntensity"/>
</mapping>
<mapping>
<level value="INFO"/>
<foreColor value="Green, HighIntensity"/>
</mapping>
<mapping>
<level value="DEBUG"/>
<foreColor value="Blue, HighIntensity"/>
</mapping>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%message%newline"/>
</layout>
</appender>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value=".\logs\this.Log-log4net.Sample.log"/>
<appendToFile value="true"/>
<maxSizeRollBackups value="10"/>
<maximumFileSize value="1MB"/>
<rollingStyle value="Size"/>
<staticLogFileName value="true"/>
<layout type="log4net.Layout.PatternLayout">
<!--<header value="[Header]&#13;&#10;" />-->
<!--<footer value="[Footer]&#13;&#10;" />-->
<!--<conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline" />-->
<conversionPattern value="%date %thread %logger [%-5level] - %message%newline"/>
</layout>
</appender>
<appender name="ErrorSmtpAppender" type="log4net.Appender.SmtpAppender">
<to value="noone@noreply.org"/>
<from value="this.Log.sample@noreply.org"/>
<subject value="this.Log Sample Console Errors - LOCAL DEBUG"/>
<smtpHost value="localhost"/>
<bufferSize value="2"/>
<lossy value="true"/>
<evaluator type="log4net.Core.LevelEvaluator">
<threshold value="ERROR"/>
</evaluator>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%newline%date %logger [%thread] %-5level %logger - %message%newline"/>
<!--<conversionPattern value="%newline%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />-->
</layout>
</appender>
<root>
<level value="DEBUG"/>
<appender-ref ref="ColoredConsoleAppender"/>
<appender-ref ref="RollingLogFileAppender"/>
<appender-ref ref="ErrorSmtpAppender"/>
</root>
</log4net>
</configuration>
Jump to Line
Something went wrong with that request. Please try again.