// Module included in the following assemblies:
//
// assembly-logging-configuration.adoc

[id='ref-operator-cluster-logging-configmap-{context}']
= Configuring Cluster Operator logging

[role="_abstract"]
Cluster Operator logging is configured through a `ConfigMap` named `strimzi-cluster-operator`.
A `ConfigMap` containing logging configuration is created when installing the Cluster Operator.
This `ConfigMap` is described in the file `install/cluster-operator/050-ConfigMap-strimzi-cluster-operator.yaml`.
You configure Cluster Operator logging by changing the `data.log4j2.properties` values in this `ConfigMap`.

To update the logging configuration, you can edit the `050-ConfigMap-strimzi-cluster-operator.yaml` file and then run the following command:
[source,shell,subs=+quotes]
kubectl create -f _install/cluster-operator/050-ConfigMap-strimzi-cluster-operator.yaml_

Alternatively, edit the `ConfigMap` directly:
[source,shell,subs=+quotes]
kubectl edit configmap strimzi-cluster-operator

With this ConfigMap, you can control various aspects of logging, including the root logger level, log output format, and log levels for different components. 
The `monitorInterval` setting, determines how often the logging configuration is reloaded. 
You can also control the logging levels for the Kafka `AdminClient` or Netty.
Netty is a framework used in Strimzi for network communication, and OkHttp is a library used for making HTTP requests.
  
If the `ConfigMap` is missing when the Cluster Operator is deployed, the default logging values are used.

If the `ConfigMap` is accidentally deleted after the Cluster Operator is deployed, the most recently loaded logging configuration is used.
Create a new `ConfigMap` to load a new logging configuration.

NOTE: Do not remove the `monitorInterval` option from the `ConfigMap`.