log4net SDK Reference

RemotingAppender.SendBuffer Method 

Send the contents of the buffer to the remote sink.

[Visual Basic]
Overrides Protected Sub SendBuffer( _
   ByVal events As LoggingEvent() _
)
[C#]
protected override void SendBuffer(
   LoggingEvent[] events
);

Parameters

events
The events to send.

Remarks

The events are not sent immediately. They are scheduled to be sent using a pool thread. The effect is that the send occurs asynchronously. This is very important for a number of non obvious reasons. The remoting infrastructure will flow thread local variables (stored in the CallContext), if they are marked as ILogicalThreadAffinative, across the remoting boundary. If the server is not contactable then the remoting infrastructure will clear the ILogicalThreadAffinative objects from the CallContext. To prevent a logging failure from having side effects on the calling application the remoting call must be made from a separate thread to the one used by the application. A ThreadPool thread is used for this. If no ThreadPool thread is available then the events will block in the thread pool manager until a thread is available.

See Also

RemotingAppender Class | log4net.Appender Namespace