hello, I create a springboot project by https://start.spring.io/,and then i add logback jar in pom file.i create a logback.xml
in resources/config/
and add logging.config=classpath:config/logback.xml
,look this pic
start via war package,I found that the configuration in yml cannot be recognized.look at it:
I found this related to tomcat version.tomcat 8.5.46 and below will have problems, but 8.5.55 and above are no problem.
Comment From: wilkinsona
Tomcat used to set a LOGGING_CONFIG
environment variable. This would override logging.config
but it was changed in Tomcat 8.5.54:
Deprecated the
LOGGING_CONFIG
environment variable and replace it with theCATALINA_LOGGING_CONFIG
environment variable to avoid clashes with other components that useLOGGING_CONFIG
. (markt)
You should upgrade to Tomcat 8.5.54 or later.
Comment From: fzustone
Thank you for your reply