<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Quick and easy log4net setup</title>
	<atom:link href="http://www.justinrhinesmith.com/blog/2008/05/12/quick-and-easy-log4net-setup/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.justinrhinesmith.com/blog/2008/05/12/quick-and-easy-log4net-setup/</link>
	<description>Adventures in Programming</description>
	<lastBuildDate>Tue, 19 Jan 2010 09:51:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: bindi</title>
		<link>http://www.justinrhinesmith.com/blog/2008/05/12/quick-and-easy-log4net-setup/comment-page-1/#comment-9706</link>
		<dc:creator>bindi</dc:creator>
		<pubDate>Tue, 19 Jan 2010 09:51:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinrhinesmith.com/blog/2008/05/12/quick-and-easy-log4net-setup/#comment-9706</guid>
		<description>Thanks.
Log4net made easy by you.</description>
		<content:encoded><![CDATA[<p>Thanks.<br />
Log4net made easy by you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vikash</title>
		<link>http://www.justinrhinesmith.com/blog/2008/05/12/quick-and-easy-log4net-setup/comment-page-1/#comment-9223</link>
		<dc:creator>vikash</dc:creator>
		<pubDate>Wed, 30 Dec 2009 08:04:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinrhinesmith.com/blog/2008/05/12/quick-and-easy-log4net-setup/#comment-9223</guid>
		<description>Great post ..yes and it really took just 15 minutes to see the log4net working.
thanks for you post.. it is really nice :)</description>
		<content:encoded><![CDATA[<p>Great post ..yes and it really took just 15 minutes to see the log4net working.<br />
thanks for you post.. it is really nice <img src='http://www.justinrhinesmith.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chetan</title>
		<link>http://www.justinrhinesmith.com/blog/2008/05/12/quick-and-easy-log4net-setup/comment-page-1/#comment-8035</link>
		<dc:creator>chetan</dc:creator>
		<pubDate>Tue, 13 Oct 2009 09:22:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinrhinesmith.com/blog/2008/05/12/quick-and-easy-log4net-setup/#comment-8035</guid>
		<description>Thx Justin,

Nice information provided by u.....</description>
		<content:encoded><![CDATA[<p>Thx Justin,</p>
<p>Nice information provided by u&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Denny Ferrassoli</title>
		<link>http://www.justinrhinesmith.com/blog/2008/05/12/quick-and-easy-log4net-setup/comment-page-1/#comment-7667</link>
		<dc:creator>Denny Ferrassoli</dc:creator>
		<pubDate>Mon, 14 Sep 2009 19:30:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinrhinesmith.com/blog/2008/05/12/quick-and-easy-log4net-setup/#comment-7667</guid>
		<description>Thanks for the example, I had log4net up and running smoothly thanks to your article.</description>
		<content:encoded><![CDATA[<p>Thanks for the example, I had log4net up and running smoothly thanks to your article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jina</title>
		<link>http://www.justinrhinesmith.com/blog/2008/05/12/quick-and-easy-log4net-setup/comment-page-1/#comment-3338</link>
		<dc:creator>Jina</dc:creator>
		<pubDate>Tue, 17 Mar 2009 14:36:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinrhinesmith.com/blog/2008/05/12/quick-and-easy-log4net-setup/#comment-3338</guid>
		<description>Hi,
Thanks for the example and explanation you&#039;ve provided.

I did the same you mentioned but I have a problem.

I have a windows service, i went to the App.config and added the needed:


  
  
  
  
    
  

    
      
      
      
        
      
    
    
      
      
    
  
  
  



and in the cs class:

i added the using:
using log4net;

and in the class i added:
private static readonly ILog log = LogManager.GetLogger(typeof(Program));

then in each method in this i added: 

log.info(&quot;entering method x&quot;);

Result: When installing the windows service, an Exception is thrown:
TypeInitializationException
Usually this exception occurs when there&#039;s sthg wrong in the app.config file.

Also on Build, the following messages are displayed :
Message	1	Could not find schema information for the element &#039;log4net&#039;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	10	4	MyNewService
Message	2	Could not find schema information for the element &#039;appender&#039;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	11	6	MyNewService
Message	3	Could not find schema information for the attribute &#039;name&#039;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	11	15	MyNewService
Message	4	Could not find schema information for the attribute &#039;type&#039;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	11	35	MyNewService
Message	5	Could not find schema information for the element &#039;file&#039;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	12	8	MyNewService
Message	6	Could not find schema information for the attribute &#039;value&#039;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	12	13	MyNewService
Message	7	Could not find schema information for the element &#039;appendToFile&#039;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	13	8	MyNewService
Message	8	Could not find schema information for the attribute &#039;value&#039;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	13	21	MyNewService
Message	9	Could not find schema information for the element &#039;layout&#039;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	14	8	MyNewService
Message	10	Could not find schema information for the attribute &#039;type&#039;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	14	15	MyNewService
Message	11	Could not find schema information for the element &#039;conversionPattern&#039;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	15	10	MyNewService
Message	12	Could not find schema information for the attribute &#039;value&#039;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	15	28	MyNewService
Message	13	Could not find schema information for the element &#039;root&#039;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	18	6	MyNewService
Message	14	Could not find schema information for the element &#039;level&#039;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	19	8	MyNewService
Message	15	Could not find schema information for the attribute &#039;value&#039;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	19	14	MyNewService
Message	16	Could not find schema information for the element &#039;appender-ref&#039;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	20	8	MyNewService
Message	17	Could not find schema information for the attribute &#039;ref&#039;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	20	21	MyNewService




do you have any idea of why this error is occuring</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Thanks for the example and explanation you&#8217;ve provided.</p>
<p>I did the same you mentioned but I have a problem.</p>
<p>I have a windows service, i went to the App.config and added the needed:</p>
<p>and in the cs class:</p>
<p>i added the using:<br />
using log4net;</p>
<p>and in the class i added:<br />
private static readonly ILog log = LogManager.GetLogger(typeof(Program));</p>
<p>then in each method in this i added: </p>
<p>log.info(&#8220;entering method x&#8221;);</p>
<p>Result: When installing the windows service, an Exception is thrown:<br />
TypeInitializationException<br />
Usually this exception occurs when there&#8217;s sthg wrong in the app.config file.</p>
<p>Also on Build, the following messages are displayed :<br />
Message	1	Could not find schema information for the element &#8216;log4net&#8217;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	10	4	MyNewService<br />
Message	2	Could not find schema information for the element &#8216;appender&#8217;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	11	6	MyNewService<br />
Message	3	Could not find schema information for the attribute &#8216;name&#8217;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	11	15	MyNewService<br />
Message	4	Could not find schema information for the attribute &#8216;type&#8217;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	11	35	MyNewService<br />
Message	5	Could not find schema information for the element &#8216;file&#8217;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	12	8	MyNewService<br />
Message	6	Could not find schema information for the attribute &#8216;value&#8217;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	12	13	MyNewService<br />
Message	7	Could not find schema information for the element &#8216;appendToFile&#8217;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	13	8	MyNewService<br />
Message	8	Could not find schema information for the attribute &#8216;value&#8217;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	13	21	MyNewService<br />
Message	9	Could not find schema information for the element &#8216;layout&#8217;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	14	8	MyNewService<br />
Message	10	Could not find schema information for the attribute &#8216;type&#8217;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	14	15	MyNewService<br />
Message	11	Could not find schema information for the element &#8216;conversionPattern&#8217;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	15	10	MyNewService<br />
Message	12	Could not find schema information for the attribute &#8216;value&#8217;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	15	28	MyNewService<br />
Message	13	Could not find schema information for the element &#8216;root&#8217;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	18	6	MyNewService<br />
Message	14	Could not find schema information for the element &#8216;level&#8217;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	19	8	MyNewService<br />
Message	15	Could not find schema information for the attribute &#8216;value&#8217;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	19	14	MyNewService<br />
Message	16	Could not find schema information for the element &#8216;appender-ref&#8217;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	20	8	MyNewService<br />
Message	17	Could not find schema information for the attribute &#8216;ref&#8217;.	C:\Documents and Settings\Pv-User\My Documents\Visual Studio 2008\Projects\MyNewService\MyNewService\App.config	20	21	MyNewService</p>
<p>do you have any idea of why this error is occuring</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Shell</title>
		<link>http://www.justinrhinesmith.com/blog/2008/05/12/quick-and-easy-log4net-setup/comment-page-1/#comment-2695</link>
		<dc:creator>Greg Shell</dc:creator>
		<pubDate>Mon, 19 Jan 2009 15:30:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinrhinesmith.com/blog/2008/05/12/quick-and-easy-log4net-setup/#comment-2695</guid>
		<description>Thanks for the info.</description>
		<content:encoded><![CDATA[<p>Thanks for the info.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zorak!</title>
		<link>http://www.justinrhinesmith.com/blog/2008/05/12/quick-and-easy-log4net-setup/comment-page-1/#comment-22</link>
		<dc:creator>Zorak!</dc:creator>
		<pubDate>Mon, 30 Jun 2008 14:08:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinrhinesmith.com/blog/2008/05/12/quick-and-easy-log4net-setup/#comment-22</guid>
		<description>Thanks for the example!</description>
		<content:encoded><![CDATA[<p>Thanks for the example!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
