log4net SDK Reference |

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

System.Object
log4net.Appender.AppenderSkeleton
log4net.Appender.NetSendAppender

[Visual Basic]
Public Class NetSendAppender
Inherits AppenderSkeleton
[C#]
public class NetSendAppender : AppenderSkeleton

#### Thread Safety

This type is not safe for multithreaded operations.

#### Remarks

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.

#### Example

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

    [XML]
    <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" />
    </appender>

#### Requirements

Namespace: log4net.Appender

Assembly: log4net (in log4net.dll)

#### See Also

NetSendAppender Members | log4net.Appender Namespace