Jignesh M. Khatri
Jignesh M. Khatri

Reputation: 1596

Java: How to disable logging for transitive dependencies but keep enabled for direct dependencies?

I am developing a Spring Boot application, where I will be using two dependencies -

  1. Direct Apache kafka-clients
  2. Another library that uses Apache kafka-clients internally

I want to adjust the logging levels for the kafka-clients which is added directly into my project but I want to turn off the logging for the kafka-clients that is added in the other library.

How can we achieve this?

If I add <logger name="org.apache.kafka" level="off"/> then it is turning off logging for both the kafka-clients.

Upvotes: 3

Views: 62

Answers (0)

Related Questions