# JMX port to use
if [ $JMX_PORT ]; then
KAFKA_JMX_OPTS="$KAFKA_JMX_OPTS -Dcom.sun.management.jmxremote.port=$JMX_PORT"
fi
with
# JMX port to use
if [ $ISKAFKASERVER = "true" ]; then
JMX_REMOTE_PORT=$JMX_PORT
else
JMX_REMOTE_PORT=$CLIENT_JMX_PORT
fi
if [ $JMX_REMOTE_PORT ]; then
KAFKA_JMX_OPTS="$KAFKA_JMX_OPTS -Dcom.sun.management.jmxremote.port=$JMX_REMOTE_PORT"
fi
After brokers has been restarted, lets modify the logLevel with
jConsole:
$ jconsole <BROKER_FQDN>:<JMX_PORT>
It launches a jconsole window, asking for Retry insecurely, go ahead
with that
go to the Mbeans tab then Kafka/kafka.log4jController/Attributes, and double-click on the Value of Loggers to get all Log4j controllers
You can see the kafka logger above those presented is set to INFO.
We can check it using the getLogLevel Operations entering the kafka
loggerName
Fortunately, you can also set the value without restarting with the
setLogLevel operation, putting in DEBUG or TRACE for example.