Kafka Consumer outputs excessive DEBUG statements to console (ecilpse)

前端 未结 4 563
我在风中等你
我在风中等你 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条回答
  •  悲&欢浪女
    2021-02-08 02:23

    Just modify the logging level of the chatty class (chatty interaction). Since in your logs you see log entries originating from org.apache.kafka.clients.consumer.internals.Fetcher you can simply adjust the logging level for that logger by adding following line to log4j.properties:

    log4j.logger.org.apache.kafka.clients.consumer.internals.Fetcher=WARN
    

    ... or any wider catching logger since these are name spaced:

    # adjusting logging for entire Kafka
    log4j.logger.org.apache.kafka=WARN
    

    Hope this helps

提交回复
热议问题