[id="configuring-log-level-docker"]
= Configuring the log level in the {prodname} container images

The {prodname} container images for Zookeeper, Kafka, and Kafka Connect all set up their `log4j.properties` file to configure the Debezium-related loggers.
All log messages are sent to the Docker container's console (and thus the Docker logs).
The log messages are also written to files under the `/kafka/logs` directory.

The containers use a `LOG_LEVEL` environment variable to set the log level for the root logger.
You can use this environment variable to set the log level for the service running in the container.
When you start the container,
set this environment variable to one of the log levels (for example, `-e LOG_LEVEL=DEBUG`),
and all of the code within the container will use that log level.

If you need more control over the logging configuration,
create a new container image that is based on ours,
except that in your `Dockerfile`, copy your own `log4j.properties` file into the image.
For example:

.Dockerfile
[source,dockerfile,options="nowrap"]
----
...
COPY log4j.properties $KAFKA_HOME/config/log4j.properties
...
----
