OneCricketeer / apache-kafka-connect-docker

[KAFKA-9774] Un-official Docker Image for Apache Kafka Connect
https://issues.apache.org/jira/browse/KAFKA-9774
Apache License 2.0
36 stars 16 forks source link

Question: Is it possible to set logger levels using kafka connect rest api? #45

Open sappusaketh opened 1 month ago

sappusaketh commented 1 month ago

I see there log4j2.xml configuring log levels in that file might work but if I want to temp set log lev for troubleshooting is there a way to do it via rest api?

OneCricketeer commented 1 month ago

Log4j doesn't expose a REST API

Refer Kafka Connect documentation for all available REST API endpoints.

sappusaketh commented 1 month ago

Kafka connect has endpoint for configuring loggers so wondering how I can use same for this

OneCricketeer commented 1 month ago

I see. I've not personally tested this.

It should be the exact same since this project doesn't modify the REST API.

OneCricketeer commented 1 month ago

Worth mentioning that CONNECT_LOG4J_LOGGERS environment variable is not available for this project; that variable is specific to the Confluent image.

sappusaketh commented 1 month ago

Ya I tried but I’m not seeing any loggers returned for that endpoint will see what I can find thank you as always for responding quickly

streamsend-io commented 1 month ago

when the logging level is changed from INFO to DEBUG using the REST API; this is logged; but the logging level does not change:

INFO Setting level of namespace root and children to DEBUG (org.apache.kafka.connect.runtime.Loggers:125)

Seconding sappusaketh's request: do you think it is possible to add adjustable logging levels for this container?

OneCricketeer commented 1 month ago

As mentioned, I'm not modifying the REST API of Connect, so all fictionality should be "possible".

I don't know what class actually implements the log feature/endpoint to know if it's available in the container.