Apache log4net� SDK Documentation - Microsoft .NET Framework 4.0

LocalSyslogAppender Class

Logs events to a local syslog service.

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


public�class�LocalSyslogAppender : 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.


Note��� This appender uses the POSIX libc library functions openlog, syslog, and closelog. If these functions are not available on the local system then this appender will not work!

The functions openlog, syslog, and closelog are specified in SUSv2 and POSIX 1003.1-2001 standards. These are used to log messages to the local syslog service.

This appender talks to a local syslog service. If you need to log to a remote syslog daemon and you cannot configure your local syslog service to do this you may be able to use the RemoteSyslogAppender to log via UDP.

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 LocalSyslogAppender.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 ApplicationFriendlyName).


Namespace: log4net.Appender

Assembly: log4net (in log4net.dll)

See Also

LocalSyslogAppender Members | log4net.Appender Namespace