Kafka Consumer outputs excessive DEBUG statements to console (ecilpse)

前端 未结 4 570
我在风中等你
我在风中等你 2021-02-08 01:34

I\'m running some sample code from http://www.javaworld.com/article/3060078/big-data/big-data-messaging-with-kafka-part-1.html?page=2, and the kafkaconsumer is consuming from to

4条回答
  •  旧时难觅i
    2021-02-08 02:06

    Not sure if you are talking about kafka-console-consumer commands, if yes this is what I did:

    [training@confluent-training-vm ~]$ cd /etc/kafka
    [training@confluent-training-vm kafka]$ grep DEBUG *.properties
    log4j.properties:# Change to DEBUG or TRACE to enable request logging
    log4j.properties:# Access denials are logged at INFO level, change to DEBUG to also 
    log allowed accesses
    tools-log4j.properties:log4j.rootLogger=DEBUG, stderr
    

    So, you just need to edit /etc/kafka/tools-log4j.properties file and remove DEBUG (or replace it for exmaple by INFO and WARM log levels on above line

    tools-log4j.properties:log4j.rootLogger=INFO, WARM, stderr
    

提交回复
热议问题