Chapter 5. Configuring log settings for Serving and Eventing
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.
5.1. Supported log levels
The following loglevel
values are supported:
Log level | Description |
---|---|
| Fine-grained debugging |
| Normal logging |
| Unexpected but non-critical errors |
| Critical errors; unexpected during normal operation |
| In debug mode, trigger a panic (crash) |
Using the debug
level for production might negatively affect performance.
5.2. 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 theKnativeServing
andKnativeEventing
CR respectively. Here are two example configurations with all possible logging options set to levelinfo
: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"