WindowsEventAppender

Writes messages to the Windows Event log.
Valid in: XML configuration

Syntax

<appender class="WindowsEventAppender" name="eventAppender">
</appender>

Syntax Description

For information about the generic elements of the appender syntax, see General Appender Syntax.

Details

WindowsEventAppender is a logging facility appender that supports event logging on Windows operating systems.
WindowsEventAppender sends events to the Windows event log. The event log might be easily overloaded. You should configure WindowsEventAppender so that the event log does not receive more events than it can handle.

Example

The following example is a typical XML configuration file that specifies the WindowsEventAppender. The parameter identifies the role of SAS as the SAS Foundation.
<?xml version="1.0" encoding="UTF-8"?>
<logging:configuration
xmlns:logging="http://www.sas.com/xml/logging/1.0/">
   <appender name="eventLog" class="WindowsEventAppender">
         <layout>
         <param name="ConversionPattern"
                value="%d %-5p [%t] %c (%F:%L) - %m"/>
      </layout>
   </appender>
   <root>
      <level value="trace"/>
      <appender-ref ref="eventLog"/>
   </root>
</logging:configuration>