RemotingAppender SendBuffer Method | Apache log4net™ SDK Documentation

Send the contents of the buffer to the remote sink.

Namespace: log4net.Appender
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    protected override void SendBuffer(
    	LoggingEvent[] events
    )

    Protected Overrides Sub SendBuffer (
    	events As LoggingEvent()
    )

    protected:
    virtual void SendBuffer(
    	array<LoggingEvent^>^ events
    ) override

    abstract SendBuffer :
            events : LoggingEvent[] -> unit
    override SendBuffer :
            events : LoggingEvent[] -> unit

#### Parameters

events
  Type:
  log4net.Core
  LoggingEvent
  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

#### Reference

RemotingAppender Class
log4net.Appender Namespace