<?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>Fredrik Haglund's blog &#187; EPiServer. loggin</title>
	<atom:link href="http://blog.fredrikhaglund.se/blog/tag/episerver-loggin/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fredrikhaglund.se</link>
	<description>Chatter about EPiServer, ASP.NET, CSS and Web Development.</description>
	<lastBuildDate>Tue, 28 Jun 2011 13:37:32 +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>Using LogView4Net with EPiServer</title>
		<link>http://blog.fredrikhaglund.se/blog/2008/09/02/using-logview4net-with-episerver/</link>
		<comments>http://blog.fredrikhaglund.se/blog/2008/09/02/using-logview4net-with-episerver/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 11:13:57 +0000</pubDate>
		<dc:creator>Fredrik Haglund</dc:creator>
				<category><![CDATA[EPiServer]]></category>
		<category><![CDATA[EPiServer. loggin]]></category>
		<category><![CDATA[log4net]]></category>
		<category><![CDATA[logview4net]]></category>
		<category><![CDATA[UdpAppender]]></category>

		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2008/09/02/using-logview4net-with-episerver/</guid>
		<description><![CDATA[I must recommend logview4net as a tool when you debug EPiServer and other apps using log4net. Logview4net can listen for UDP packages from your development environment and is in my opinion a little bit faster to work with than logging to file. (Read handling the enormous, ever growing EPiServerErrorLog.txt files that can not be deleted&#8230;) [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.fredrikhaglund.se/wp-content/uploads/2008/09/image.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; margin: 0px 10px 0px 0px; border-right-width: 0px" height="156" alt="image" src="http://blog.fredrikhaglund.se/wp-content/uploads/2008/09/image-thumb.png" width="244" align="left" border="0" /></a> I must recommend <a href="http://sourceforge.net/projects/logview4net">logview4net</a> as a tool when you debug EPiServer and other apps using <a href="http://logging.apache.org/log4net/">log4net</a>.</p>
<p><a href="http://sourceforge.net/projects/logview4net">Logview4net</a> can listen for UDP packages from your development environment and is in my opinion a little bit faster to work with than logging to file. (Read handling the enormous, ever growing EPiServerErrorLog.txt files that can not be deleted&#8230;)</p>
<p>Read more about <a href="http://world.episerver.com/en/Documentation/Items/Tech-Notes/EPiServer-CMS-5/EPiServer-CMS-SP2/Logging-in-EPiServer-CMS-5/">how to setup logging in EPiServer 5</a>. Remove the comment around the <em>udpLogAppender</em> at the end of <em>EPiServerLog.config</em> and start <em>logview4net</em> and listen on the specified port.</p>
<h3>UdpAppender Unable to send logging event to remote host</h3>
<p>When you try to setup log4view to use the UdpAppender it will not work and you will get error like this in your Debug Output:</p>
<p><code>ERROR [UdpAppender] Unable to send logging event to remote host fe80::9af:9baa:8874:74d3%8 on port 8888. </code></p>
<p>System.Net.Sockets.SocketException: An address incompatible with the requested protocol was used   <br />&#160;&#160; at System.Net.Sockets.Socket.SendTo(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint remoteEP)    <br />&#160;&#160; at System.Net.Sockets.UdpClient.Send(Byte[] dgram, Int32 bytes, IPEndPoint endPoint)    <br />&#160;&#160; at log4net.Appender.UdpAppender.Append(LoggingEvent loggingEvent)</p>
<p>It appears that there is are <a href="http://odalet.wordpress.com/2007/01/13/log4net-ip-parsing-bug-when-used-with-framework-net-20/">issues in net 2.0 with IPv6 interfering with the parsing of the remoteAddress</a> but the <a href="https://issues.apache.org/jira/browse/LOG4NET-112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel">bug fix appear not to work</a>.</p>
<h3>Workaround to IPV6 Issue</h3>
<p>I guess you can recompile the library yourself with correct compiler directives but it is easier to use another address than 127.0.0.1 as loop-back address to workaround the defect.</p>
<p><a href="http://markmail.org/message/2nlxkf5i6v3xvda7">I use 127.0.0.2 like suggested here and then everything works fine</a>.</p>
<p><code>&lt;appender name=&quot;udpLogAppender&quot; type=&quot;log4net.Appender.UdpAppender&quot; &gt;     <br />&#160; &lt;encoding value=&quot;utf-16&quot; /&gt;      <br />&#160; &lt;remoteAddress value=&quot;<strong>127.0.0.2</strong>&quot; /&gt;      <br />&#160; &lt;remotePort value=&quot;8888&quot; /&gt;      <br />&#160; &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;      <br />&#160;&#160;&#160; &lt;conversionPattern value=&quot;%date %level [%thread] %type.%method - %message%n%exception&quot; /&gt;      <br />&#160; &lt;/layout&gt;      <br />&lt;/appender&gt; </code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fredrikhaglund.se/blog/2008/09/02/using-logview4net-with-episerver/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

