Este contenido no está disponible en el idioma seleccionado.
Chapter 4. Configuring Data Grid Operator
4.1. Configure Operator logging Copiar enlaceEnlace copiado en el portapapeles!
Configure the Data Grid Operator to output logs in JSON format for improved machine processing and log aggregation. You can also adjust the logging level to increase verbosity for debugging reconciliation issues.
INFINISPAN_OPERATOR_LOG_FORMATvariableSpecifies the output format.
-
console(default): Human-readable text. -
json: Structured JSON format for log aggregators.
-
INFINISPAN_OPERATOR_LOG_LEVELvariableSets the verbosity of logs.
-
Valid values are
debug,info(default),warn, orerror.
-
Valid values are
In production environments, it is highly recommended to set INFINISPAN_OPERATOR_LOG_FORMAT to json. This ensures logs are easily indexed by monitoring tools like Splunk, Elasticsearch, or Datadog.
Procedure
- Open your Data Grid Operator Subscription for editing
Add the logging environment variables under the spec.config.env field:
apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: datagrid namespace: openshift-operators spec: channel: 8.6.x installPlanApproval: Automatic name: datagrid source: redhat-operators sourceNamespace: openshift-marketplace config: env: - name: INFINISPAN_OPERATOR_LOG_FORMAT value: json - name: INFINISPAN_OPERATOR_LOG_LEVEL value: warn- Apply the changes.OLM will automatically restart the Operator pod to apply the new configuration.
Retrieve logs from Operator pod as required.
oc logs -f deployment/infinispan-operator-controller-manager
Logging format comparison
Console
2026-04-14T09:28:48.546Z INFO controllers.Infinispan Triggering StatefulSet Rolling upgrade {"infinispan": "infinispan/infinispan"}
JSON
{"level":"info","ts":"2026-04-14T09:33:53.960Z","logger":"controllers.Infinispan","msg":"Triggering StatefulSet Rolling upgrade","infinispan":"infinispan/infinispan"}