views:

33

answers:

2

Is there an appender in log4net that can allow a winform client to read a log4net log on another server without using a share? My application is hosted as a web service. I'm looking for an HTTP appender or something similar.

A: 

I think you could use the Remoting Appender, something like this:

<appender name="RemotingAppender" type="log4net.Appender.RemotingAppender" >
    <sink value="http://localhost:8080/LoggingSink" />
    <lossy value="false" />
    <bufferSize value="95" />
    <onlyFixPartialEventData value="true" />
</appender>

According to the docs:

This Appender is designed to deliver events to a remote sink. That is any object that implements the RemotingAppender.IRemoteLoggingSink interface. It delivers the events using .NET remoting. The object to deliver events to is specified by setting the appenders Sink property.

Joe R
A: 

There is also a UdpAppender and there is this open source client that can receive these messages:

http://log2console.codeplex.com/

Stefan Egli
Does the UDP allow review of the whole log? Or just the realtime event that are occurring? log2console is great, but I'd like to do the same in my winform application. Obviously not as robust as log2console. I'm thinking something like http://geekswithblogs.net/kobush/archive/2005/07/15/46627.aspx
Renegrin
With UDP you just get real-time events. Your link is about configuring chainsaw which is something like log2console... I am not sure what you are trying to tell me.
Stefan Egli