THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||
---|---|---|
| ||
public interface Log4jControllerMBean { /** * @return a list of all registered loggers */ List<String> getLoggers(); /** * Get the effective log level for a given logger * * @param logger name of the logger * @return its log level ("INFO", for example) */ String getLogLevel(String logger); /** * Set the log level for a logger * * @param logger name of the logger * @param level desired level ("INFO", for example) * @return true, if successfully set, false otherwise. */ Booleanboolean setLogLevel(String logger, String level); } |
...
This will provide a JMX bean Log4jController
in the kafka.connect
domain, that will include a Loggers
attribute, along with two operations: getLogLevel
and setLogLevel
that we can use to get or set log levels for individual loggers in the process.
Example Usage with JConsole
The following screenshots show to use JConsole to check and alter the log level of a class (org.apache.kafka.connect.runtime.Worker).
Compatibility, Deprecation, and Migration Plan
...