When requested by IBM support, trace logging can be configured in Event Processing to add more troubleshoot logging. This is useful for attempting to debug the system, as it captures additional details about what precisely is happening in the product code.
Note: Different levels of trace logging are permitted. However, the most relevant levels to use when you configure troubleshooting are trace
or debug
.
Configure trace logging for the Event Processing or IBM Operator for Apache Flink instances as follows.
For the Event Processing instance
Trace logging can be configured for an Event Processing instance by editing the EventProcessing
custom resource. This enables trace logging that can be observed from the pod logs. To enable trace logging, update your EventProcessing
custom resource to set the TRACE_LEVEL
and TRACE_SPEC
environment variables:
kind: EventProcessing
[...]
spec:
authoring:
template:
pod:
spec:
containers:
- env:
- name: TRACE_LEVEL
value: "<VALUE>"
name: ui
- env:
- name: TRACE_SPEC
value: "<VALUE>"
name: backend
[...]
Note: <VALUE>
is provided by IBM Support.
For the IBM Operator for Apache Flink instance
-
In Event Processing version 1.3.1 and later, you can configure trace logging without recreating the
JobManager
orTaskManager
pods for an IBM Operator for Apache Flink instance, which consists of editing the ConfigMap associated with theFlinkDeployment
custom resource. New Flink deployments introduce amonitorInterval
log property, which defaults to 30 seconds. This property enables dynamic updates to the log4j configuration.To enable dynamic trace logging, edit the ConfigMap associated with the
FlinkDeployment
custom resource as follows:- Locate the ConfigMap associated with your
FlinkDeployment
. It is typically named in the format:flink-config-<FlinkDeployment-name>
. - Edit the ConfigMap, specifically the section related to
log4j-console.properties
. - Within
log4j-console.properties
, change the value of therootLogger.level
property to<VALUE>
. - Save the changes to the ConfigMap.
- Locate the ConfigMap associated with your
-
In earlier versions, you can manually set this property in the
FlinkDeployment
custom resource to achieve the same dynamic log4j configuration updates.kind: FlinkDeployment [...] spec: logConfiguration: log4j-console.properties: | monitorInterval=30 # Allows this configuration to be modified at runtime. The file will be checked every 30 seconds. <VALUE> [...]
After completing this update, the new configuration will be automatically reflected in the Flink deployment and future changes will be reflected within approximately 30 seconds without restarting the taskManager
or the JobManager
pods.
See also the FlinkDeployment Logging Configuration documentation.