Reputation: 18511
I am using slf4j over logback in java.
How do I eliminate logging from a specific jar?
It prints a lot of info and I want to raise only its level to debug.
Upvotes: 1
Views: 51
Reputation: 42010
You can specify in the logback.xml
the package of classes that you do not want in the logs:
<logger name="org.hibernate" level="ERROR" />
* The value of the level
attribute admitting one of the case-insensitive string values TRACE, DEBUG, INFO, WARN, ERROR, ALL or OFF. The special case-insensitive value INHERITED, or its synonym NULL, will force the level of the logger to be inherited from higher up in the hierarchy.
See more in Chapter 3: Logback configuration of the The logback manual.
Upvotes: 2
Reputation: 4574
Seems like it's not possible switch off logger from specific jar, but you can switch off logger for main package of this jar.
Like:
your.lib.main.package = OFF
Upvotes: 1