Spring Boot logging level


Problem: When I'm testing my Spring application hundreds of lines of log code appear (DEBUG level).

The quantity of log is particularly important using Spring integration.

According to the spring documentation it should be possible to set the level of debug in the application.properties but the level of logs did not change.

The solution is to create a logback.xml in the classpath of the test ([PROJECT_ROOT]/src/test/resources):

<?xml version="1.0" encoding="UTF-8"?> 
	<include resource="org/springframework/boot/logging/logback/base.xml"/> 
	<logger name="org.springframework" level="INFO"/> 

Before and after the change




Spring logging

Spring Logback.xml

Fullstack Angular / Java application quick start guide.
WebApp built by Marco using SpringBoot 3.2.4 and Java 21. Hosted in Switzerland (GE8).