Spring boot - Unable to disable logging

I am trying to disable console output in STS for a spring boot application using the application.properties file.

Setting the logging.level.root value does have some effect, but I cannot turn it off completely, and I cannot turn off the automatic configuration report output.

logging.level.root=OFF
spring.main.banner-mode=OFF
application.version=@project.version@

      

Banner is disabled using spring.main.banner-mode property.

For some reason with the above properties, I still get DEBUG output from spring on startup:

 2017-05-09 15:33:16.744 DEBUG 11772 --- [           main] .b.l.ClasspathLoggingApplicationListener : Application started with classpath:
 2017-05-09 15:33:16.798 DEBUG 11772 --- [           main] o.s.boot.SpringApplication               : Loading source class 

      

There are more lines telling me which properties files are being loaded, but I don't want to fill them in.

Following this, I am getting the autoconfiguration report output.

I am wondering if I have a configuration issue and if this would cause the spring output to continue on startup?

+3


source to share


2 answers


It's a good answer to my own question, and after trial and error, I finally ended up with the following, which suppresses all output when run through the application.properties file:

 logging.level.root=OFF
 logging.level.org.springframework.boot=OFF
 spring.main.banner-mode=OFF

      



I hope this helps someone else!

Greetings

+3


source


Add the following to the package of your choice.

logging.level.<package>=OFF

      



logging.level.root=OFF

doesn't work for me

+1


source







All Articles