log4netapache-chainsaw

How to get log4net to work with Chainsaw on local machine


I would like to use log4net's UdpAppender with Apache Chainsaw to log messages from my ASP.NET web application. I followed instructions on log4net's website, but no Udp packets are sent (firewall is turned off, and I tried to monitor my machine with TcpView - no udp packets were generated at all; other appenders re working). Log4net debug doesn't give any errors, UdpAppender gets added to loggers. I don't know what I am missing.

My config file is:

<log4net debug="true">
  <renderer renderingClass="Logging.HttpContextRenderer" renderedClass="System.Web.HttpContext" />
  <appender name="UdpAppender" type="log4net.Appender.UdpAppender">
    <localPort value="8080" />
    <remoteAddress value="127.0.0.1" />
    <remotePort value="8080" />
    <layout type="log4net.Layout.XmlLayoutSchemaLog4j">
      <locationInfo value="true" />
    </layout>
  </appender>
 <root>
    <priority value="ALL"/>
    <appender-ref ref="UdpAppender"/>
  </root>
</log4net>

Solution

  • Here's an archive of someone with similar issues using the log4net udp appender: http://www.mail-archive.com/log4net-user@logging.apache.org/msg03906.html

    You can use Chainsaw V2 with a regular text file if that would be easier (using VFSLogFilePatternReceiver).

    A new version of Chainsaw will be released shortly with a lot of enhancements. A pre-release version and screen shot are available here:

    http://people.apache.org/~sdeboy/