Ce contenu n'est pas disponible dans la langue sélectionnée.

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

Apprendre

Essayez, achetez et vendez

Communautés

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de la documentation Red Hat

Legal Notice

Theme

© 2026 Red Hat
Retour au début