Search code examples
log4netlog4net-configuration

Does Log4Net Http Appender exist?


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.


Solution

  • 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.