Este conteúdo não está disponível no idioma selecionado.

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:

Table 5.1. Supported log levels
Log levelDescription

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)

Warning

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 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"

Red Hat logoGithubRedditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja oBlog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

© 2024 Red Hat, Inc.