5.2. 配置日志设置
您可以在 KnativeServing
自定义资源(CR)和 KnativeEventing
CR 中配置 Serving 和 Eventing 的日志记录。
流程
通过在
KnativeServing
和KnativeEventing
CR 中设置或修改loglevel
值来配置 Serving 和 Eventing 的日志设置。以下是两个示例配置,所有可能的日志选项都设置为 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"