mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
49 lines
1.8 KiB
Plaintext
49 lines
1.8 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * security/cert_manager_operator/cert-manager-log-levels.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="cert-manager-enable-operator-log-level_{context}"]
|
|
= Setting a log level for the {cert-manager-operator}
|
|
|
|
You can set a log level for the {cert-manager-operator} to determine the verbosity of the operator log messages.
|
|
|
|
.Prerequisites
|
|
|
|
* You have access to the cluster with `cluster-admin` privileges.
|
|
* You have installed version 1.11.1 or later of the {cert-manager-operator}.
|
|
|
|
.Procedure
|
|
|
|
* Update the subscription object for {cert-manager-operator} to provide the verbosity level for the operator logs by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc -n cert-manager-operator patch subscription openshift-cert-manager-operator --type='merge' -p '{"spec":{"config":{"env":[{"name":"OPERATOR_LOG_LEVEL","value":"v"}]}}}' <1>
|
|
----
|
|
<1> Replace `v` with the desired log level number. The valid values for `v` can range from `1`to `10`. The default value is `2`.
|
|
|
|
.Verification
|
|
|
|
. The cert-manager Operator pod is redeployed. Verify that the log level of the {cert-manager-operator} is updated by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc set env deploy/cert-manager-operator-controller-manager -n cert-manager-operator --list | grep -e OPERATOR_LOG_LEVEL -e container
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
# deployments/cert-manager-operator-controller-manager, container kube-rbac-proxy
|
|
OPERATOR_LOG_LEVEL=9
|
|
# deployments/cert-manager-operator-controller-manager, container cert-manager-operator
|
|
OPERATOR_LOG_LEVEL=9
|
|
----
|
|
|
|
. Verify that the log level of the {cert-manager-operator} is updated by running the `oc logs` command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc logs deploy/cert-manager-operator-controller-manager -n cert-manager-operator
|
|
---- |