How to set the logging level for Kafka Connect

Until Apache Kafka 2.4 you can change the log level of Kafka Connect by editing log4j properties file 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:

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:

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" }'