<?xml version="1.0" encoding="utf-8" ?>
<!-- 
		.NET application configuration file     
		This file must have the exact same name as your application with .config appended to it. 
		
		For example if your application is ConsoleApp.exe then the config file must be ConsoleApp.exe.config. 
		It must also be in the same directory as the application. 
	-->
<configuration>
	<!-- Register the section handler for the log4net section -->
	<configSections>
		<section name="log4net" type="System.Configuration.IgnoreSectionHandler" />
	</configSections>
	<appSettings>
		<!-- To enable internal log4net logging specify the following appSettings key -->
		<!-- <add key="log4net.Internal.Debug" value="true"/> -->
	</appSettings>
	<!-- This section contains the log4net configuration settings -->
	<log4net>
		<!-- Define some output appenders -->
		<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
			<file value="rolling-log.txt" />
			<appendToFile value="true" />
			<maxSizeRollBackups value="10" />
			<maximumFileSize value="100" />
			<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" />
			</layout>
		</appender>
		<appender name="LogFileAppender" type="log4net.Appender.FileAppender">
			<file value="log-file.txt" />
			<!-- Example using environment variables in params -->
			<!-- <file value="${TMP}\log-file.txt" /> -->
			<sppendToFile value="true" />
			<!-- An alternate output encoding can be specified -->
			<!-- <encoding value="unicodeFFFE" /> -->
			<layout type="log4net.Layout.PatternLayout">
				<header value="[Header]&#13;&#10;" />
				<footer value="[Footer]&#13;&#10;" />
				<conversionPattern value="%date [%thread] %-5level %logger [%ndc] &lt;%property{auth}&gt; - %message%newline" />
			</layout>
			<!-- Alternate layout using XML			
			<layout type="log4net.Layout.XMLLayout" /> -->
		</appender>
		<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
			<layout type="log4net.Layout.PatternLayout">
				<conversionPattern value="%date [%thread] %-5level %logger [%ndc] &lt;%property{auth}&gt; - %message%newline" />
			</layout>
		</appender>
		<!-- Setup the root category, add the appenders and set the default level -->
		<root>
			<level value="WARN" />
			<appender-ref ref="LogFileAppender" />
			<appender-ref ref="ConsoleAppender" />
		</root>
		<!-- Specify the level for some specific categories -->
		<logger name="ConsoleApp.LoggingExample">
			<level value="ALL" />
			<appender-ref ref="RollingLogFileAppender" />
		</logger>
	</log4net>
</configuration>