log4net SDK Reference |

# EventLogAppender Class

Writes events to the system event log.

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

System.Object
log4net.Appender.AppenderSkeleton
log4net.Appender.EventLogAppender

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

#### Thread Safety

This type is not safe for multithreaded operations.

#### Remarks

The `EventID` of the event log entry can be set using the `EventLogEventID` property (Properties) on the LoggingEvent.

There is a limit of 32K characters for an event log message

When configuring the EventLogAppender a mapping can be specified to map a logging level to an event log entry type. For example:

    [XML]
    <mapping>
        <level value="ERROR" />
        <eventLogEntryType value="Error" />
    </mapping>
    <mapping>
        <level value="DEBUG" />
        <eventLogEntryType value="Information" />
    </mapping>

The Level is the standard log4net logging level and eventLogEntryType can be any value from the EventLogEntryType enum, i.e.:

- Error - an error event
- Warning - a warning event
- Information - an informational event

#### Requirements

Namespace: log4net.Appender

Assembly: log4net (in log4net.dll)

#### See Also

EventLogAppender Members | log4net.Appender Namespace