Customizing log levels

Starting the Operational Decision Manager components produces logs that capture all sorts of messages and events. These logs help you to debug the component when a problem occurs.

About this task

When you install Operational Decision Manager on Certified Kubernetes, the following configmap files are created. They define the default log levels for each Operational Decision Manager component. You can also log access by uncommenting the relevant section in the configmap. It is important to keep the access log identifier named accessLogging. See the Liberty documentation HTTP access logging for details on how to customize the access logs.

Table 1. Naming convention for configmap files
Component Name of configmap
Decision Center <release_name>-odm-dc-logging-configmap
Decision Runner <release_name>-odm-dr-logging-configmap
Decision Server Console <release_name>-odm-ds-console-logging-configmap
Decision Server Runtime <release_name>-odm-ds-runtime-logging-configmap

Where <release_name> is the name you gave to the Kubernetes deployment.

Table 2. Logging level default values of Operational Decision Manager components
Operational Decision Manager component traceSpecification traceFileName traceFormat
Decision Center
*=audit
org.apache.solr.*=warning
com.ibm.rules.bdsl.search.solr.*=warning
="stdout" ="BASIC"
Decision Runner

Decision Server Console

Decision Server Runtime

*=audit
com.ibm.rules.*=info
ilog.rules.*=info
="stdout" ="BASIC"

The traceFileName description writes information to a named file (trace.log). The traceFormat can be set to BASIC, ENHANCED, or ADVANCED formats.

The default loggers that are listed in the traceSpecification column provide a good level of messages without impacting performance.

The available log levels for tracing are off, fatal, severe, warning, audit, info, config, detail, fine, finer, finest, all. You might want to customize the log levels, for example to output less detail and enhance the execution performance. However, if you need more detail for debugging you can add loggers, either for an entire Operational Decision Manager component or for a single class.

For more information, see Logging and Trace.

Attention: Increasing the log level might slow down the execution performance drastically.

Procedure

  1. To change the default log levels, open a shell to the running pod and make a copy of the configmap file.
    $ kubectl get configmap <release_name>-odm-<component>-logging-configmap -o yaml > cf-logging.yaml
    
  2. Edit the settings in the cf-logging.yaml file and then apply the change.
    $ kubectl apply -f cf-logging.yaml
  3. Restart the pods that are running the component containers.

Results

After you change a log setting, the /config/logging/logging.xml file of the ODM container is updated.

The /logs/messages.log file of the ODM container shows the change in a new message. For example, the following message shows a change to the trace state.

com.ibm.ws.logging.internal.TraceSpecification I TRAS0018I: The trace state has been changed. The new trace state is ...