I am trying to disable log output from all external libraries in logback-test.xml. Somehow it doesn’t work as advertised, and I don’t understand why.
This is the contents of my logback-test.xml:
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</Pattern>
</layout>
</appender>
<logger name="httpclient.wire" level="OFF" />
<logger name="o.s" level="OFF"/>
<logger name="org.spring" level="OFF"/>
<logger name="org.apache" level="OFF"/>
<root level="DEBUG">
<appender-ref ref="STDOUT"/>
</root>
</configuration>
I explicitly disabled the org.spring logger, but I still see all the debug output from Spring. However, if I specify a different level in the element, it works. Any ideas why this is happening?
source
share