log4net SDK Reference

RemoteSyslogAppender Class

Logs events to a remote syslog daemon.

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

System.Object
   log4net.Appender.AppenderSkeleton
      log4net.Appender.UdpAppender
         log4net.Appender.RemoteSyslogAppender

[Visual Basic]
Public Class RemoteSyslogAppender
    Inherits UdpAppender
[C#]
public class RemoteSyslogAppender : UdpAppender

Thread Safety

This type is not safe for multithreaded operations.

Remarks

The BSD syslog protocol is used to remotely log to a syslog daemon. The syslogd listens for for messages on UDP port 514.

The syslog UDP protocol is not authenticated. Most syslog daemons do not accept remote log messages because of the security implications. You may be able to use the LocalSyslogAppender to talk to a local syslog service.

There is an RFC 3164 that claims to document the BSD Syslog Protocol. This RFC can be seen here: http://www.faqs.org/rfcs/rfc3164.html. This appender generates what the RFC calls an "Original Device Message", i.e. does not include the TIMESTAMP or HOSTNAME fields. By observation this format of message will be accepted by all current syslog daemon implementations. The daemon will attach the current time and the source hostname or IP address to any messages received.

Syslog messages must have a facility and and a severity. The severity is derived from the Level of the logging event. The facility must be chosen from the set of defined syslog RemoteSyslogAppender.SyslogFacility values. The facilities list is predefined and cannot be extended.

An identifier is specified with each log message. This can be specified by setting the Identity property. The identity (also know as the tag) must not contain white space. The default value for the identity is the application name (from Domain).

Requirements

Namespace: log4net.Appender

Assembly: log4net (in log4net.dll)

See Also

RemoteSyslogAppender Members | log4net.Appender Namespace