<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Scott&#039;s code and other ponderings... &#187; log4net</title>
	<atom:link href="http://www.scottleckie.com/category/log4net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scottleckie.com</link>
	<description>...how hard can it be?...</description>
	<lastBuildDate>Fri, 23 Dec 2011 01:55:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>My favourite log4net config settings</title>
		<link>http://www.scottleckie.com/2010/03/my-favourite-log4net-config-settings/</link>
		<comments>http://www.scottleckie.com/2010/03/my-favourite-log4net-config-settings/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 00:03:06 +0000</pubDate>
		<dc:creator>Scott Leckie</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[log4net]]></category>

		<guid isPermaLink="false">http://www.scottleckie.com/?p=87</guid>
		<description><![CDATA[<p>It occurred to me, tonight, as I copied and pasted the same generic log4net config to a new project that I do this because this is my favourite log4net configuration. And, if it&#39;s a good enough starting point for all my projects then it may be of interest to others.</p>
<p>&#160;</p>
<p>This config writes to two appenders; the console and a file appender. The file appender is pretty neat in that it;</p>

Creates log files in a logs/ folder
The standard file is &#34;general.txt&#34;
This file grows on each iteration, until it reaches a maximum size of 2MB
When it hits 2MB, the file is renamed and a new &#34;general.txt&#34; file is opened
Maintains a maximum of 10 renamed / archived log files (so, a total of 20MB [...]]]></description>
		<wfw:commentRss>http://www.scottleckie.com/2010/03/my-favourite-log4net-config-settings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding log4net to a new project &#8211; cribsheet</title>
		<link>http://www.scottleckie.com/2010/03/adding-log4net-to-a-new-project-cribsheet/</link>
		<comments>http://www.scottleckie.com/2010/03/adding-log4net-to-a-new-project-cribsheet/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 00:13:13 +0000</pubDate>
		<dc:creator>Scott Leckie</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[log4net]]></category>

		<guid isPermaLink="false">http://www.scottleckie.com/?p=82</guid>
		<description><![CDATA[<p>log4net is a fantastic library for adding configurable logging to your project. Configuration is relatively straightforward but I always get caught out when adding it to a new project.</p>
<p>So, here&#39;s a cribsheet for adding it in&#8230;</p>

Download the latest stable library, and add a reference to it within your own project
Ensure that you have an app.config file
Add the configSection for log4net (see samples, below)
Add the log4net section (another sample)
Add an ILog object to your class
And, the bit I always forget, add the [assembly] entry to the top of your class

<p>In your app.config file, add log4net to the &#60;configSections&#62; (if you don&#39;t have one of these, it goes at the next level down from the &#60;configuration&#62; element;</p>
&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34; ?&#62;
&#60;configuration&#62;
&#60;configSections&#62;
&#60;section name=&#34;log4net&#34; type=&#34;log4net.Config.Log4NetConfigurationSectionHandler,log4net&#34; /&#62;
&#60;/configSections&#62;
<p>&#160;</p>
<p>Next, [...]]]></description>
		<wfw:commentRss>http://www.scottleckie.com/2010/03/adding-log4net-to-a-new-project-cribsheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

