Help Center/ MapReduce Service/ Component Operation Guide (Normal)/ Using Kafka/ Common Issues About Kafka/ Configuring Logs for Shell Commands on the Kafka Client
Updated on 2026-06-27 GMT+08:00
Configuring Logs for Shell Commands on the Kafka Client
Issue
How do I set the log level for shell commands on the client?
Procedure
- Log in to the node where the Kafka client is installed as the client installation user.
- Switch to the Kafka client installation directory, for example, /opt/client.
cd /opt/client
- Run the following command to switch to the Kafka client configuration directory:
cd Kafka/kafka/config
- Open the tools-log4j.properties file, change WARN to INFO, and save the file.


- Switch to the Kafka client installation directory, for example, /opt/client.
cd /opt/client
- Run the following command to configure environment variables:
source bigdata_env
- Run the following command to perform user authentication (skip this step for a cluster in common mode):
kinit Component service user
- Run the following command to switch to the Kafka client installation directory:
cd Kafka/kafka/bin
- Run the following command to obtain the topic information. The log information can be viewed on the console.
kafka-topics.sh --list --zookeeper 10.5.144.2:2181/kafka
[2017-02-17 14:34:27,005] INFO JAAS File name: /opt/client/Kafka/./kafka/config/jaas.conf (org.I0Itec.zkclient.ZkClient) [2017-02-17 14:34:27,007] INFO Starting ZkClient event thread. (org.I0Itec.zkclient.ZkEventThread) ... Test __consumer_offsets counter test test2 test3 test4
Parent topic: Common Issues About Kafka
What is your overall rating for this page?
0
1
2
3
4
5
6
7
8
9
10
Very dissatisfiedVery satisfied
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot