Logging and tracing outside the WebSphere environment

For stand-alone components that run outside the WebSphere® environment, you can enable logging and tracing using the IBM® Logging Toolkit for Java™ (JLog). These components include emitters, notification helpers, the event submission interface of the event server, and the default filter plug-in.

Draft comment:
Is this topic relevant? Will there be any scenario, in the upcoming release, when the customer would log and/or trace outside the WPS environment?

The JLog facility uses a properties file to specify which components should have logging and tracing enabled, as well as the trace level to use. For more information about JLog, see http://www.alphaworks.ibm.com/tech/loggingtoolkit4j.

To enable JLog tracing, follow these steps:

  1. Draft comment:
    Is the WAS_HOME designation going to be correct for WPS?
    Copy the properties file $WAS_HOME/properties/EventsJLogConfig.properties to the directory from which the Java program runs.
  2. Using a text editor, open the copied properties file.
  3. Modify the settings related to the component for which you want to enable logging.
    For each listed component, there are three configuration statements:
    trc.com.ibm.events.component.logging=[true|false]
    trc.com.ibm.events.component.component=component_name
    trc.com.ibm.events.component.level=level
    To enable logging, set *.logging=true. For *.level, specify one of the following levels, in order of increasing detail:
    • DEBUG_MIN
    • DEBUG_MID
    • DEBUG_MAX
    For example, to enable the maximum level of logging and tracing for the emitter component, the properties file should contain the following statements:
    trc.com.ibm.events.emitter.logging=true
    trc.com.ibm.events.emitter.component=EventEmitter
    trc.com.ibm.events.emitter.level=DEBUG_MAX
The resulting log files are written to the /logs/event directory. You can override this default location by modifying the line at the end of the properties file, which is commented out by default. For example, to specify that log files should be written to /mylogs, the properties file should contain the following statement:
handler.file.fileDir=/mylogs

Parent topic: Administering the Common Event Infrastructure