Search code examples
slf4jsuppress

Suppress slf4j debug messages


I have a package imported through Maven which logs a lot of DEBUG level messages. Since I can't control this package's logback.xml (?), can I in some other fashion suppress the package's output to stdout?


Solution

  • Since I can't control this package's logback.xml (?)

    Yes you can:

    <logger name="com.example.foo" level="ERROR" />
    

    where com.example.foo is the package you want to filter. It is typically consistent with artifact's groupId. Also consider WARN level, OFF is also possible, however it may hide important problems.