×

You can configure logging for OpenShift Serverless Serving and OpenShift Serverless Eventing using the KnativeServing and KnativeEventing custom resource (CR). The level of logging is determined by the specified loglevel value.

Supported log levels

The following loglevel values are supported:

Table 1. Supported log levels
Log level Description

debug

Fine-grained debugging

info

Normal logging

warn

Unexpected but non-critical errors

error

Critical errors; unexpected during normal operation

dpanic

In debug mode, trigger a panic (crash)

Using the debug level for production might negatively affect performance.

Configuring log settings

You can configure logging for Serving and Eventing in the KnativeServing custom resource (CR) and KnativeEventing CR.

Procedure
  • Configure the log settings for Serving and Eventing by setting or modifying the loglevel value in the KnativeServing and KnativeEventing CR respectively. Here are two example configurations with all possible logging options set to level info:

    KnativeServing CR
    apiVersion: operator.knative.dev/v1beta1
    kind: KnativeServing
    metadata:
      name: knative-serving
      namespace: knative-serving
    spec:
      config:
        logging:
          loglevel.controller: "info"
          loglevel.autoscaler: "info"
          loglevel.queueproxy: "info"
          loglevel.webhook: "info"
          loglevel.activator: "info"
          loglevel.hpaautoscaler: "info"
          loglevel.net-certmanager-controller: "info"
          loglevel.net-istio-controller: "info"
          loglevel.net-kourier-controller: "info"
    KnativeEventing CR
    apiVersion: operator.knative.dev/v1beta1
    kind: KnativeEventing
    metadata:
      name: knative-eventing
      namespace: knative-eventing
    spec:
      config:
        logging:
          loglevel.controller: "info"
          loglevel.eventing-webhook: "info"
          loglevel.inmemorychannel-dispatcher: "info"
          loglevel.inmemorychannel-webhook: "info"
          loglevel.mt-broker-controller: "info"
          loglevel.mt_broker_filter: "info"
          loglevel.mt_broker_ingress: "info"
          loglevel.pingsource-mt-adapter: "info"