// Module included in the following assemblies:
//
// * security/cert_manager_operator/cert-manager-operator-integrating-istio.adoc

:_mod-docs-content-type: PROCEDURE
[id="cert-manager-istio-csr-setting-log-level_{context}"]
= Setting the log level for the istio-csr component

[role="_abstract"]
You can set the log level for the istio-csr component to control the verbosity and format of its log messages.

.Prerequisites

* You have access to the cluster with `cluster-admin` privileges.
* You have created the `IstioCSR` custom resource (CR).

.Procedure

. Edit the `IstioCSR` CR by running the following command:
+
[source,terminal]
----
$ oc edit istiocsrs.operator.openshift.io default -n <istio_csr_project_name> <1>
----
+
Replace `<istio_csr_project_name>` with the namespace where you created the `IstioCSR` CR.

. Configure the log level and format in the `spec.istioCSRConfig` section by using the following example configuration:
+
[source,yaml]
----
apiVersion: operator.openshift.io/v1alpha1
kind: IstioCSR
...
spec:
  istioCSRConfig:
    logFormat: text
    logLevel: 2
# ...
----
+
where:
+
`istioCSRConfig.logFormat`:: Specifies the log output format. You can set this field to either `text` or `json`.
`istioCSRConfig.logLevel`:: Specifies the log level. Supported values are in the range `1` through `5`, as defined by Kubernetes logging guidelines. The default value is `1`.

. Save and close the editor to apply your changes. After the changes are applied, the cert-manager Operator updates the log configuration for the istio-csr operand.
