PropertySourceBootstrapConfiguration.reinitializeLoggingSystem can't log the exception
PropertySourceBootstrapConfiguration.reinitializeLoggingSystem can't log the exception
PropertySourceBootstrapConfiguration.logger.warn("Error opening logging config file " + logConfig, ex); it won't work
environment: spring-cloud-context 3.1.0
cause:
system.initialize(new LoggingInitializationContext(environment), logConfig, logFile); this line will call org.springframework.boot.logging.logback.LogbackLoggingSystem#stopAndReset and cleard the ROOT logger's appender list.
so the PropertySourceBootstrapConfiguration.logger.warn won't work.
I can confirm this. We've migrated a project to spring-cloud-context 3.0.3 and no longer see any warning or error message if the log config file is missing. I suppose it is related to the change in https://github.com/spring-cloud/spring-cloud-commons/commit/4a2e83ea461e2ba88ecd27b2c00f2eda1bef43e7