Este contenido no está disponible en el idioma seleccionado.

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

Aprender

Pruebe, compre y venda

Comunidades

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de la documentación de Red Hat

Legal Notice

Theme

© 2026 Red Hat
Volver arriba