How to configure logging for Kafka producers?

后端 未结 5 1899
清酒与你
清酒与你 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:44

    Define the logging level as below in application.yml file or your properties file.

    logging:
      level:
        root: INFO
        org:
          apache:
            kafka: WARN
    

    By defining the above, Kafka will print out only the warnings logs.

提交回复
热议问题