spring-cloud / spring-cloud/spring-cloud-commons
PropertySourceBootstrapConfiguration.reinitializeLoggingSystem can't log the exception
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 751
- Forks
- 744
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at PropertySourceBootstrapConfiguration.reinitializeLoggingSystem and trace the call to system.initialize with spring-cloud-context 3.1.0, including LogbackLoggingSystem#stopAndReset. Reproduce the logging configuration failure and verify that the exception from opening the logging config file remains observable after the ROOT logger appender list is cleared.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- backend, observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100