Configuring logging

You can handle logging and tracing configurations by enabling tracing at server start up, enabling tracing on a WebSphere Commerce instance, or enabling logging on the WebSphere Commerce client library on a stand-alone program.

You can now configure independent log levels for classes and packages.


When you work with IBM to debug request processing problems, there might be occasions where low-level tracing components must be enabled to capture details for how the request is processed. These low-level Application server trace components do not know the request intent or the potential data within. Therefore, when enabled, it is possible that these tracing components might potentially include sensitive information, in plain text, in the trace file.

It is recommended that you do not enable these types of tracing components on a production system and attempt to simulate the problem on a quality assurance environment to capture the appropriate information. However, if the tracing components must be enabled on a production system, handle the trace files with caution. Before you send the trace, remove sensitive data that might be in the trace before you allow a third party to use the trace for diagnosis. Further, when the trace is no longer required, remove the files with a military-grade data wiping process. When the problem is found and the tracing component is no longer required, immediately disable the low-level tracing components.


  • Enable tracing in WebSphere Commerce. These steps are duplicated from theWebSphere Application Server documentation. For more information, see the Working with trace group of topics in the WebSphere Application Server documentation.
    1. Open the WebSphere Application Server Administrator's Console. To do so within Rational Application Developer, right-click the WebSphere Commerce Test Server and select Administration > Run administrative console.
    2. Expand Troubleshooting > Logs and Trace. The Logging and Tracing page displays in the workspace on the right.
    3. Click the server for which you want to enable the tracing (such as 'server1'). The window refreshes to display the logging and tracing options for the server.
    4. Click Diagnostic Trace. The Diagnostic Trace Service window displays in the workspace.
    5. Click the Configuration or Runtime tab.
      Changes made to Configuration are stored on the file system and applied when the server starts. You must restart the server to pick up any changes. This is required for finding issues that originate or occur when the server is initiated. Modifications to Runtime are applied immediately and are lost after the server is restarted.
    6. Optional: Select Change Log Detail Levels to modify tracing configurations for components or packages.
      • For component-based traces, use the component names. For a list of component-based traces, see Trace components.
      • For package-based loggers, find the package or class name and determine the appropriate logger name to use. Consider the following SolrSearchConfigurationRegistry class as an example:
        Set the following trace specification:
        Class-level tracing is enabled starting from Fix Pack 8. Use the exact match to the package and class name:
      If you are tracing multiple log detail levels, separate the traces with a colon. For example:

      Tracking all helps in diagnosing problems so that multiple traces can be avoided. As an alternative to all, classes can also use warning and info traces, where info contains the least trace impact.

      For more information about enabling tracing for the correct components and configuring the proper trace settings for your environment, see:
    7. Click Apply > OK to apply the changes to your server. If you selected to change the log details levels on the Configuration tab, restart your server.
  • Enabling logging on the WebSphere Commerce client library on a stand-alone program

    You can debug problems when a stand-alone Java program has issues with the WebSphere Commerce client library by enabling logging.

    The foundation logging helper,, is used to obtain logging objects. This class has helper methods that determine whether tracing and entry and exit tracing is enabled. Logging properties are overridden with a separate logging properties file.

    1. Navigate to a directory of your choice and create a new file called
    2. Paste the following contents into the file:
      # Handlers
      # Default global logging level
      # ConsoleHandler
      # FileHandler
      # Naming style for the output file:
      # Name of the character set encoding to use
      # Limiting size of output file in bytes:
      # Number of output files to cycle through
      # Style of output (Simple or XML):
      Default properties:
      Property Value
      Logging level FINE
      Encoding UTF8
      Log file size limit 25MB
      Log file scrolling 2
    3. Restart your application, specifying the following generic JVM arguments in theWebSphere Application Server Administrator's Console.
      For example, Application servers > server1 > Process definition > Java Virtual Machine:
      Include the following path into the class path of the Java application:

      Where file_path is the directory of your choice, created in the first step.