...
This change will introduce an /admin/loggers
endpoint to the Connect worker . In addition, a new configuration property admin.listeners
will be provided to specify which listener to use for the /admin
endpointthat can be used to get/modify the log levels of any named loggers in the Connect worker. The /admin/loggers
endpoint will support the following operations:
Get a list of all named loggers
Code Block | ||
---|---|---|
| ||
$ curl -Ss http://localhost:8083/admin/loggers | jq [ ... "org.apache.kafka.connect.runtime.WorkerSinkTask": { "level": "INFO" }, "org.apache.kafka.connect.runtime.WorkerSourceTask": { "level": "DEBUG" }, ... ] |
Get the log level of a specific logger
...
Set the log level of a specific logger
Use PUT to set the level of a logger. The API returns a list of loggers whose levels were modified.
Code Block | ||
---|---|---|
| ||
$ curl -Ss -X PUT '{"level": "TRACE"}' http://localhost:8083/admin/loggers/org.apache.kafka.connect.runtime.WorkerSinkTask { modified: [ "org.apache.kafka.connect.runtime.WorkerSinkTask" ] } |
Setting the log level of an ancestor (for example, org.apache.kafka.connect
as opposed to a classname) will update the levels of all child classes. Any levels previously set by this API will also be overridden.
Code Block | ||
---|---|---|
| ||
$ curl -Ss -X PUT '{"level": "TRACE"}' http://localhost:8083/admin/loggers/org.apache.kafka.connect { modified: no output |
Configuration Changes
[
...
"org.apache.kafka.connect.runtime.WorkerSinkTask",
"org.apache.kafka.connect.runtime.WorkerSourceTask",
...
]
} |
The above call returns org.apache.kafka.connect.runtime.WorkerSinkTask
and org.apache.kafka.connect.runtime.WorkerSourceTask
because they fall under the specified ancestor. If no name parameter is present, this API will set the log level of the root logger.
Configuration Changes
In addition, a new configuration property admin.listeners
will be provided to specify which listener to use for the /admin
endpoint. An additional configuration property will be used to control how the admin endpoint is made available.
...