log4net SDK Reference |

# LocalSyslogAppender Class

Logs events to a local syslog service.

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

System.Object
log4net.Appender.AppenderSkeleton
log4net.Appender.LocalSyslogAppender

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

#### Thread Safety

This type is not safe for multithreaded operations.

#### Remarks

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

#### Requirements

Namespace: log4net.Appender

Assembly: log4net (in log4net.dll)

#### See Also

LocalSyslogAppender Members | log4net.Appender Namespace