Chapter 4. Configuring Data Grid Operator


4.1. Configure Operator logging

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_FORMAT variable

Specifies the output format.

  • console (default): Human-readable text.
  • json: Structured JSON format for log aggregators.
INFINISPAN_OPERATOR_LOG_LEVEL variable

Sets the verbosity of logs.

  • Valid values are debug, info (default), warn, or error.
Tip

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

  1. Open your Data Grid Operator Subscription for editing
  2. 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
  3. Apply the changes.OLM will automatically restart the Operator pod to apply the new configuration.
  4. 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"}

Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat Documentation

Legal Notice

Theme

© 2026 Red Hat
Back to top