<?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>Daniele Demichelis &#187; logging</title>
	<atom:link href="http://www.danidemi.com/mainwww/tag/logging/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.danidemi.com/mainwww</link>
	<description>There are 10 types of people in the world: Those who understand binary, and those who don&#039;t...</description>
	<lastBuildDate>Wed, 14 Apr 2010 08:14:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Obtain the root logger programmatically in log4net</title>
		<link>http://www.danidemi.com/mainwww/2010/03/obtain-the-root-logger-programmatically-in-log4net/</link>
		<comments>http://www.danidemi.com/mainwww/2010/03/obtain-the-root-logger-programmatically-in-log4net/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 11:15:35 +0000</pubDate>
		<dc:creator>danidemi</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://www.danidemi.com/mainwww/?p=113</guid>
		<description><![CDATA[<p>If you use log4net, you could have the need to configure the loggers programamtically. The problem arise when you want access to the root logger, since the documentation does not explain well how to obtain it.
So, here&#8217;s a snippet that show how to do it. Don&#8217;t forget to imort the log4net namespaces.</p>



using log4net;


using log4net.Core;


using log4net.Appender;


using [...]]]></description>
			<content:encoded><![CDATA[<p>If you use log4net, you could have the need to configure the loggers programamtically. The problem arise when you want access to the root logger, since the documentation does not explain well how to obtain it.<br />
So, here&#8217;s a snippet that show how to do it. Don&#8217;t forget to imort the log4net namespaces.</p>
<div class="geshi no csharp">
<ol>
<li class="li1">
<div class="de1"><span class="kw1">using</span> log4net;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">using</span> log4net.<span class="me1">Core</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">using</span> log4net.<span class="me1">Appender</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">using</span> log4net.<span class="me1">Layout</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">using</span> log4net.<span class="me1">Repository</span>.<span class="me1">Hierarchy</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">using</span> log4net.<span class="me1">Config</span>;</div>
</li>
</ol>
</div>
<div class="geshi no csharp">
<ol>
<li class="li1">
<div class="de1">Hierarchy h <span class="sy0">=</span> <span class="br0">&#40;</span>Hierarchy<span class="br0">&#41;</span>log4net.<span class="me1">LogManager</span>.<span class="me1">GetRepository</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">Logger rootLogger <span class="sy0">=</span> h.<span class="me1">Root</span>;</div>
</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.danidemi.com/mainwww/2010/03/obtain-the-root-logger-programmatically-in-log4net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
