IBM Worklight v5.0.5 > WL server administration > Logging and monitoring

Route logging to Windows event log - Apache Tomcat

If you are using Apache Tomcat on Windows, you can change the log output destination by configuring Windows Event Viewer.

  1. If it does not exist, create file...

      TOMCAT_DIRECTORY/bin/setenv.bat

  2. Edit the setenv.bat file to include the following line:

      CLASSPATH=WORKLIGHT_DIR/WorklightServer/logging/worklight-windows-event-viewer-logging.jar

  3. To set up Windows Event Viewer edit...

      TOMCAT_DIRECTORY/conf/logging.properties

    ...and include the following lines...

      handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler, com.worklight.core.logging.windows.WindowsEventViewerHandler

      .handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

      com.worklight.handlers = com.worklight.core.logging.windows.WindowsEventViewerHandler
      com.worklight.core.logging.windows.WindowsEventViewerHandler.level = ALL
      com.worklight.core.logging.windows.WindowsEventViewerHandler.formatter = java.util.logging.SimpleFormatter

  4. Modify the value of the system variable PATH to include the path to the Worklight .dll files....

    • WORKLIGHT_DIR/WorklightServer/logging/bin.windows-x86/IBMEventLog.dll
    • WORKLIGHT_DIR/WorklightServer/logging/bin.windows-x86/EventLogCategories.dll
    • WORKLIGHT_DIR/WorklightServer/logging/bin.windows-x64/IBMEventLog.dll
    • WORKLIGHT_DIR/WorklightServer/logging/bin.windows-x64/EventLogCategories.dll

  5. Create the registry key EventMessageFile in the registry folder...

      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\Application\IBMEventLog

    The value of the key is the full path to EventLogCategories.dll.


Parent Logging and monitoring





+

Search Tips   |   Advanced Search