Remoting Receiver (log4net 1.2.9)

The Remoting Receiver (log4net 1.2.9) receives logging events which are sent from a remote host using the .NET remoting infrastructure. The Remoting Receiver implements and publishes an instance of RemotingAppender.IRemoteLoggingSink on the specified Port and Uri and listens for logging events delivered from any remote RemotingAppender. More than one application may send logging events to the same Remoting Receiver. You may create several Remoting Receivers with different Port and Uri settings.

 

A Remoting Receiver following additional properties:

Property

Access

Description

Port

create + read + write

The port the receiver is listening to.

[Number]

Uri

create + read + write

The URI the receiver is listening to.

[URI]

 

From the log4net API you can use the RemotingAppender to connect with a Remoting Receiver.

The following example will configure a RemotingAppender from log4net to send the logging events to a Remoting Receiver on port 8085 and uri LoggingSink in a MAS XTrace Viewer on the same computer:

<appender name="RemotingAppender" type="log4net.Appender.RemotingAppender">
    <bufferSize value="1" />
    <sink value="tcp://localhost:8085/LoggingSink" />
</appender>

RemotingAppenders do not use a layout; they send a serialized log4net.Core.LoggingEvent object to the server side. Therefore, compatible .NET Frameworks must be underlie both the RemotingAppender and the MAS XTrace Viewer.