Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<log4net>
<appender name="RootLogFileAppender" type="log4net.Appender.RollingFileAppender">
<param name="File" value="log\<<PROJECT NAME>>.Root.log" />
<param name="AppendToFile" value="true" />
<param name="MaxSizeRollBackups" value="1" />
<param name="MaximumFileSize" value="250MB" />
<param name="RollingStyle" value="Size" />
<param name="LockingModel" type="log4net.Appender.FileAppender+MinimalLock" />
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%d&#9;[%t]&#9;%-5p&#9;%c&#9;%m%n" />
</layout>
</appender>
<appender name="AppLogFileAppender" type="log4net.Appender.RollingFileAppender">
<param name="File" value="log\<<PROJECT NAME>>.App.log" />
<param name="AppendToFile" value="true" />
<param name="MaxSizeRollBackups" value="1" />
<param name="MaximumFileSize" value="250MB" />
<param name="RollingStyle" value="Size" />
<param name="LockingModel" type="log4net.Appender.FileAppender+MinimalLock" />
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%d&#9;[%t]&#9;%-5p&#9;%c&#9;%m%n" />
</layout>
</appender>
<root>
<level value="WARN"/>
<appender-ref ref="RootLogFileAppender"/>
</root>
<logger name="<<PROJECT NAME>>" additivity="false">
<level value="ALL" />
<appender-ref ref="AppLogFileAppender" />
</logger>
</log4net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.