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_offsetscountertesttest2test3test4
Parent topic: Using Kafka
- Issue
- Procedure