// file included in the following:
//
// con-operator-setting-log-levels.adoc

[id='proc-operator-setting-log-levels-proxy{context}']

= Overriding proxy logging levels

[role="_abstract"]
This procedure describes how to override the logging level of the Kroxylicious Proxy.

.Prerequisites

* An instance of Kroxylicious deployed by the Kroxylicious Operator.

.Procedure

. Apply the `KROXYLICIOUS_APP_LOG_LEVEL` or `KROXYLICIOUS_ROOT_LOG_LEVEL` environment variable to the proxy's Kubernetes `Deployment` resource:
+
[source,bash]
----
kubectl set env -n <namespace> deployment <deployment_name> KROXYLICIOUS_APP_LOG_LEVEL=DEBUG
----
+
The `Deployment` resource has the same name as the `KafkaProxy`.
+
Kubernetes recreates the proxy pod automatically.

. Verify that the new logging level has taken affect:
+
[source,bash]
----
kubectl logs -f -n <namespace> deployment/<deployment_name>
----

== Reverting proxy logging levels

This procedure describes how to revert the logging level of the Kroxylicious Proxy back to its defaults.

.Prerequisites

* An instance of Kroxylicious deployed by the Kroxylicious Operator.

.Procedure

. Remove the `KROXYLICIOUS_APP_LOG_LEVEL` or `KROXYLICIOUS_ROOT_LOG_LEVEL` environment variable from the proxy's Kubernetes Deployment:
+
[source,bash]
----
kubectl set env -n <namespace> deployment <deployment_name> KROXYLICIOUS_APP_LOG_LEVEL-
----
+
Kubernetes recreates the proxy pod automatically.
. Verify that the logging level has reverted to its default:
+
[source,bash]
----
kubectl logs -f -n <namespace> deployment/<deployment_name>
----
