2

I would like to use the debug=true flag when running my spring boot applications during development, but I do not want it to print the autoconfiguration report every time I start the application because I am not changing my spring configuration all the time and it should be enough to only look at the autoconfiguration report when I actually need to make some modifications to the auto configuration.

Is there a way to deactivate the autoconfig report in a spring boot application but at the same time keep the debug flag such that debug message are still printed in log output?

1 Answer 1

2

Take a look at this section of Spring Boot docs. You can define debug logging only for certain packages of your app:

logging.level.root=WARN logging.level.org.springframework.web=ERROR logging.level.org.hibernate=ERROR logging.level.your.package=DEBUG 

This way Spring and Spring Boot debug outputs are not printed and you can see only your debug outputs. Running Spring Boot with debug mode is very noisy and slows down your development a lot. Do that only if you are troubleshooting Spring related issues.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.