I am trying to turn off the console output in STS for a spring boot application using the application.properties file.
Setting the value logging.level.root does seem to have some effect but I can never turn it off completely and nor can I turn off the auto configuration report output.
logging.level.root=OFF spring.main.banner-mode=OFF application.version=@project.version@
The banner does get turned off by the property spring.main.banner-mode.
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 dont want to fill up this post with them.
Following from this I then get the autoconfiguration report output.
I am wondering if I have a configuration issue and if this would cause spring to continue to output on start up?
Advertisement
Answer
To answer my own question: after trial and error, I finally ended up with the following which suppresses all output on startup via the application.properties
file:
logging.level.root=OFF logging.level.org.springframework.boot=OFF spring.main.banner-mode=OFF