# How to set the logging level for Kafka Connect

**URL:** <https://ask.lenses.io/t/how-to-set-the-logging-level-for-kafka-connect/37>\
**Category:** Apache Kafka Connectors\
**Tags:** logs\
**Created:** [April 11, 2023, 2:46pm UTC](https://ask.lenses.io/t/how-to-set-the-logging-level-for-kafka-connect/37 "2023-04-11T14:46:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrewstevenson](https://dub1.discourse-cdn.com/flex017/user_avatar/ask.lenses.io/andrewstevenson/32/15_2.png) [@andrewstevenson](https://ask.lenses.io/u/andrewstevenson)\
**Post date:** [April 11, 2023, 2:46pm UTC](https://ask.lenses.io/t/how-to-set-the-logging-level-for-kafka-connect/37/1 "2023-04-11T14:46:45Z")

</div>

Until Apache Kafka 2.4 you can change the log level of Kafka Connect by editing log4j properties file _connect-log4j.properties_. It is necessary to restart the Kafka Connect worker for the changes to take effect. To enable DEBUG log level for stream-reactor connectors append the following lines:

```auto
log4j.logger.com.datamountaineer.streamreactor=DEBUG
log4j.logger.io.lenses.streamreactor=DEBUG

```

For Kafka Connect 2.5 and later it is possible to change log levels dynamically by using the admin/logger API. Changes are effective immediately without a restart:

```auto
curl -X PUT "http://localhost:8083/admin/loggers/com.datamountaineer.streamreactor" -H "Content-Type: application/json" -d '{ "level": "DEBUG" }'

curl -X PUT "http://localhost:8083/admin/loggers/io.lenses.streamreactor" -H "Content-Type: application/json" -d '{ "level": "DEBUG" }'

```
