Enabling solution trace

Use the solutionTraceEnabled solution property to monitor the activity of events and their result. The solutionTraceEnabled property retrieves information about events that are being processed by the solution.

About this task

The solution trace captures a log message of an event when it occurs, the data of the event, and the state of the bound entity before and after the event. Errors are also logged in the trace. The solution trace monitors activity at the event level, and does not contain unrelated information that is captured in the default trace log.

Enable the solutionTraceEnabled property, by setting it in the solution_properties.xml file or by using the solutionManager setproperty command. When solution trace is enabled, it generates a <solution>-0.log file, and stores the trace data in JSON. You can configure the property to write the log messages directly in to the messages.log file instead of the default <solution>-0.log file.

Note: Enabling solution trace might affect performance, in particular in a java agent test.

Procedure

  1. Run the solutionManager setproperty command to enable solution trace:
    solutionManager setproperty <solution_name> solutionTraceEnabled=true
    By default, the output is written into a <solution>-0.log file. The log file is in the <InstallDir>/runtime/wlp/usr/servers/server_name/logs directory.
  2. Optional: If you decide to trace the logs into the messages.log file, then use the solutionTraceSpecific property:
    solutionManager setproperty <solution_name> solutionTraceSpecific=false
    The log file is in the <InstallDir>/runtime/wlp/usr/servers/server_name/logs directory.
    Note: At any time, you can decide to move back the logging to a separate file by setting solutionTraceSpecific=true.

What to do next

You can use ELK or any aggregator to analyze the historical data for any event.