Windows Event Log Appender

TIBCO Streaming provides a Logback appender for Windows, which is configured using the standard Logback configuration mechanisms. The supported appender configuration values are shown in the following table.

Configuration Value Description Required?
application Application name for logged events. No. Default value is Application.
class Log appender class name. Must be set to com.tibco.ep.dtm.logappenders.windowseventlogger.WindowsEventLoggerAppender. Yes.
layout LogBack appender layout. See the LogBack layout documentation. Yes.
server Windows UNC name of the remote log server. No. Default is local machine's log server.
source Event source name. Yes.

The following is an example of a Logback configuration for an Windows event log appender:

<appender
   name="win-appender"
   class="com.tibco.ep.dtm.logappenders.windowseventlogger.WindowsEventLoggerAppender">
   <source>sample.event.source.name</source>
   <layout class="ch.qos.logback.classic.PatternLayout">
      <pattern>d{HH:mm:ss.SSS} %thread %-5level %logger: %msg%n</pattern>
   </layout>
</appender>

The next table shows how Logback log levels are mapped to the Windows Event Log event types.

LogBack Log Level Windows Event Log Event Type
ERROR 0x1
WARN 0x2
All others 0x4

Logback log levels are also mapped to the Windows Event Logger category identifiers:

LogBack Log Level Windows Event Log Category Mapping
ERROR 1
WARN 2
INFO 3
INFO 4
TRACE 5