Before a test is run Spring logs some messages with DEBUG level:
16:34:47.177 [Test worker] DEBUG org.springframework.test.context.junit4.SpringJUnit4ClassRunner - SpringJUnit4ClassRunner constructor called with [class com.bmw.csc.blocs.cache.TanEventCacheHandlerTest]
16:34:47.186 [Test worker] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating CacheAwareContextLoaderDelegate from class [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate]
...
Is there some way to disable those messages? I have no idea how to configure it as my logger configuration from logback.xml
and application.yml
seems to be ignored. The logging format
is also different from the one configured in the logback.xml
:
05.12.2019 16:34:54.390 INFO .catalina.core.StandardService [ Test worker] - Starting service [Tomcat]
05.12.2019 16:34:54.391 INFO e.catalina.core.StandardEngine [ Test worker] - Starting Servlet engine: [Apache Tomcat/9.0.27]
So the output is not generated using Logback. Looking into SpringJUnit4ClassRunner
I can see that
a org.apache.commons.logging.LogFactory
is used to create the logger. However, commons-logging
seems not to be used (when I list the dependencies).
How can I configure this logger to not log DEBUG messages?