Capturing diagnostic data and logging information

Enable first failure data capture (FFDC) services and logging to capture diagnostic and debugging information. You can use this information to track and troubleshoot your Java™ clients, and record errors that might occur when events are submitted for processing.

About this task

FFDC records capture the exception stack and extra data that is generated when an exception error occurs. These records provide useful information to help you troubleshoot problems, in addition to the trace.log files. By default, FFDC logs are written to the temporary directory of the system. To change the location where FFDC logs are written, add the Java property com.ibm.ia.ffdc.jse.output.dir to the Java client to set the directory for the FFDC output files. You can also enable logging within the Java client classes and direct the log files to a specific location.

Procedure

  1. Set the logging level for a test driver instance by adding the loglevel property to the testdriver.properties file. You can set the log level to SEVERE, WARNING, INFO, FINE, FINER, or FINEST. The level OFF is used to turn off logging. Level ALL is used to enable logging of all messages. For example:
    loglevel=SEVERE
    A log file is created in the location that is defined by the TESTDRIVER_HOME environment variable.
  2. Add the FFDC Java property to a class that creates a TestDriver instance. For example:
    java -Dcom.ibm.ia.ffdc.jse.output.dir=c:\temp MyTestDriverProject
    Where the FFDC records are written to the c:\temp directory.
    If an FFDC incident occurs, the Java console displays a message to indicate that an FFDC record was created. For example:
    INFO: CWMBD9617I: FFDC information has been written to c:\temp\i2a_1_14.03.19_13.45.11_1.txt
  3. Set the Java property for the FFDC logging policy to control how often FFDC records are generated. For example:
    java -Dcom.ibm.ia.ffdc.jse.policy=ALWAYS
    The default value of the logging policy property is ONCE, which generates a single FFDC record for each location in the source code that generates an error. You can disable FFDC logging by setting the policy property value to OFF. To capture every FFDC incident, set the policy property to ALWAYS.
  4. To capture product-wide logging information, set the Java property IALogToFile. For example:
    java -DIALogToFile=true MyTestDriverProject
    Log file names start with IA and end with the .log extension.
  5. Optional: Configure the logging level and the location where product-wide log files are stored.
    1. Optional: By default, log files are created in the system temporary directory. To specify a different directory as the location for the log files, set the Java property IALogDirectory. For example:
      java -DIALogDirectory=c:\temp MyTestDriverProject
      Where log files are written to the c:\temp directory.
    2. Optional: By default, the logging level is INFO. Edit the logging.properties file in the <InstallDir>/jdk/jre/lib directory and modify the value of the level property. For example:
      .level=SEVERE
    3. Optional: To set the logging level in a different properties file, specify the alternative file in the Java property java.util.logging.config.file. For example:
      java -Djava.util.logging.config.file=c:\MyFile.properties MyTestDriverProject
      Where the logging level is determined by the properties in MyFile.properties. In this example, the MyFile.properties file also controls the level of messages that are written to the Java console.
  6. Decision Server Insights uses WebSphere® eXtreme Scale, which also captures a log that includes trace messages of the entity loader and event sequences. Change the log level in the <InstallDir>/runtime/ia/etc/wxs_logging.properties file to either info, fine, finer, or finest and specify the properties file by using the Java property traceSettingsFile. For example:
    java -DtraceSettingsFile=C:\IBM\ODMInsights88\runtime\ia\etc\wxs_logging.properties MyTestDriverProject
    To disable WebSphere eXtreme Scale logging, use *=off only in the wxs_logging.properties file.

    You can also use standard Java logging. To write standard Java log messages to a file, add the java.util.logging.FileHandler property to the logging configuration file. See the logging configuration information in the WebSphere Application Server documentation.