Questo contenuto non è disponibile nella lingua selezionata.

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

Formazione

Prova, acquista e vendi

Community

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni sulla documentazione di Red Hat

Legal Notice

Theme

© 2026 Red Hat
Torna in cima