How -Dlogging.level JVM argument is handled in spring boot, spring cloud
Clash Royale CLAN TAG#URR8PPP
How -Dlogging.level JVM argument is handled in spring boot, spring cloud
I have a spring cloud application, which under the covers uses spring boot.
In the bootstrap phase of the app I am using some classes from the apache commons config library under: org.apache.commons.configuration
org.apache.commons.configuration
My application is started with this flag per the spring docs:
-Dlogging.level.org.apache.commons.configuration=INFO
-Dlogging.level.org.apache.commons.configuration=INFO
Despite this, i am still getting DEBUG level logs emitted during the bootstrap phase of spring....
I am lost as to how to properly specify the log level of INFO specified for the bootstrap phase of spring boot.
Whatever comes w/ spring-boot, spring-cloud, slf4j w/ logback
– bitsofinfo
Aug 13 at 5:53
But how come you're seeing any DEBUG level messages at all? Did you set the root logging level to DEBUG?
– Dovmo
Aug 13 at 19:00
set root logger is DEBUG, and
-Dlogging.level.org.apache.commons.configuration=INFO
– bitsofinfo
Aug 16 at 6:46
-Dlogging.level.org.apache.commons.configuration=INFO
2 Answers
2
Ensure you are not setting debug=true in application properties or not passing --debug flag to the application.
In application.properties set:
debug=false
The configuration of spring boot has a specific order, so probably somewhere in the application or bootstrap configuration files the logging level is configured to DEBUG.
Source:
https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html
I understand, however this system level property to the JVM is
-Dlogging.level.org.apache.commons.configuration=INFO
yet that is eminating DEBUG logs– bitsofinfo
Aug 16 at 6:47
-Dlogging.level.org.apache.commons.configuration=INFO
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
What does the rest of your logging configuration look like? Also, what are you using to log (i.e. log4j2, logback, etc.)?
– Dovmo
Aug 12 at 21:42