spring-cloud / spring-cloud/spring-cloud-commons

PropertySourceBootstrapConfiguration.reinitializeLoggingSystem can't log the exception

Open
#1,067 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

waiting-for-triage
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.