Apache log4net� SDK Documentation - Microsoft .NET Framework 4.0

NetSendAppender Class

Logs entries by sending network messages using the NetMessageBufferSend native function.

For a list of all members of this type, see NetSendAppender Members.


public�class�NetSendAppender : AppenderSkeleton

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.


You can send messages only to names that are active on the network. If you send the message to a user name, that user must be logged on and running the Messenger service to receive the message.

The receiver will get a top most window displaying the messages one at a time, therefore this appender should not be used to deliver a high volume of messages.

The following table lists some possible uses for this appender :

Action Property Value(s)
Send a message to a user account on the local machine

Server = <name of the local machine>

Recipient = <user name>

Send a message to a user account on a remote machine

Server = <name of the remote machine>

Recipient = <user name>

Send a message to a domain user account

Server = <name of a domain controller | uninitialized>

Recipient = <user name>

Send a message to all the names in a workgroup or domain

Recipient = <workgroup name | domain name>*

Send a message from the local machine to a remote machine

Server = <name of the local machine | uninitialized>

Recipient = <name of the remote machine>

Note : security restrictions apply for sending network messages, see NetMessageBufferSend for more information.


An example configuration section to log information using this appender from the local machine, named LOCAL_PC, to machine OPERATOR_PC :

<appender name="NetSendAppender_Operator" type="log4net.Appender.NetSendAppender">
    <server value="LOCAL_PC" />
    <recipient value="OPERATOR_PC" />
    <layout type="log4net.Layout.PatternLayout" value="%-5p %c [%x] - %m%n" />


Namespace: log4net.Appender

Assembly: log4net (in log4net.dll)

See Also

NetSendAppender Members | log4net.Appender Namespace