Windows Event Logging

StreamBase Studio 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 Universal Naming Convention (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 Windows event logger appender Logback configuration:

<appender
   name="win-appender"
   class="com.tibco.ep.dtm.logappenders.windowseventlogger.WindowsEventLoggerAppender">
   <source>sample.event.source</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 Logger event types.

LogBack Log Level Windows Event Logger 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 Logger Event Type
ERROR 1
WARN 2
INFO 3
INFO 4
TRACE 5