Reputation: 187
If I want to set the logging level in the yaml configuration via environment variables and the environment variable is not set, the default value will not be taken.
logging.level.: ${LOG_LEVEL:INFO}
logging.level.org.hibernate: ${LOG_LEVEL_HIBERNATE:INFO}
Output:
o.s.b.l.LoggingApplicationListener: Cannot set level: ${LOG_LEVEL:INFO} for ''
o.s.b.l.LoggingApplicationListener: Cannot set level: ${LOG_LEVEL_HIBERNATE:INFO} for 'org.hibernate'
This is only when setting the logging level, because in LoggingApplicationListener#setLogLevels
a PropertyPlaceholderResolver wasn't used. All other properties can be set via env vars and it's belonging default values...
Does anyone solved this, perhaps by overriding the LoggingApplicationListener
?
Upvotes: 0
Views: 1550
Reputation: 58094
That wasn't supported in Spring Boot (it is now: https://github.com/spring-projects/spring-boot/issues/1680).
Upvotes: 1