// file included in the following:
//
// assembly-operator-monitoring.adoc

[id='con-operator-setting-log-levels-{context}']
= Setting log levels

[role="_abstract"]

You can independently control the logging level of both the Kroxylicious Operator and the Kroxylicious Proxy.

In both cases, logging levels are controlled using two environment variables:

* `KROXYLICIOUS_APP_LOG_LEVEL` controls the logging of the application (`io.kroxylicious` loggers). It defaults to `INFO`.
* `KROXYLICIOUS_ROOT_LOG_LEVEL` controls the logging level at the root. It defaults to `WARN`.

When trying to diagnose a problem, start first by raising the logging level of `KROXYLICIOUS_APP_LOG_LEVEL`.
If more detailed diagnostics are required, try raising the `KROXYLICIOUS_ROOT_LOG_LEVEL`. Both the proxy and operator
use Apache Log4J2 and use logging levels understood by it: `TRACE`, `DEBUG`, `INFO`, `WARN`, and `ERROR`.

WARNING: WARNING: Running the operator or the proxy at elevated logging levels, such as `DEBUG` or `TRACE`, can generate a large volume of logs, which may consume significant storage and affect performance.
Run at these levels only as long as necessary.

include::./proc-operator-setting-log-levels-proxy.adoc[leveloffset=+1]
ifdef::include-olm[]
include::./proc-operator-setting-log-levels-operator-olm.adoc[leveloffset=+1]
endif::[]
include::./proc-operator-setting-log-levels-operator-bundle.adoc[leveloffset=+1]
