How to configure logging for Kafka producers?

后端 未结 5 1885
清酒与你
清酒与你 2021-02-04 03:00

I am using Kafka producer client and i don\'t have any log4j configuration in my project.

On running, the program prints a lot of Kafka Debug logs which i really don\'t

5条回答
  •  抹茶落季
    2021-02-04 03:55

    org.apache.log4j.Logger.getLogger("org").setLevel(Level.WARN);
    org.apache.log4j.Logger.getLogger("akka").setLevel(Level.WARN);
    org.apache.log4j.Logger.getLogger("kafka").setLevel(Level.WARN);
    

提交回复
热议问题