Kafka Connect Logging

Question

How to enable debug logging on stream-reactor connectors

Answer

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:

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:

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