This seems to have started some time in the past week. I am testing by pulling down the main
branch, building it, installing locally, and using 4.0.0-SNAPSHOT in my local client.
In this scenario, set spring.cloud.config.fail-fast
to true and/or set spring.config.import
to configserver:
(so it is not optional),
Expected: When a spring-cloud-config-client tries to connect to one or more config server URLs and all calls fail, a log file is produced. Observed: No log file is produced. (I see a stack trace in the console when running in IDE.)
This will make it very difficult for adding alerts or troubleshooting. I am 99% sure that this worked a week or so ago (testing against "main" branch) because I had old log files that were produced during this scenario. However, I unfortunately deleted them, so can't prove it. It certainly works for our production apps (which are at SB 2.2).
I have attached a sample IntelliJ project that demonstrates the issue. Note that I was running with Java 17. (Ignore the name of the file in the zipped project that has "Java8".)
ConfigServerClient_NoLogging.zip
Comment From: marnee01
@ryanjbaxter Asked me to try 2021.0.1, also. I will see if I can reproduce it that way.
Comment From: marnee01
I switched spring-cloud.version
to 2021.0.1
and the issue still presented itself.
Comment From: ryanjbaxter
Can you try with Spring Cloud 2022.0.1?
Comment From: marnee01
It is still not working. Here is an updated little project to demonstrate. ConfigServerClient_NoLogging_SB3.zip
Comment From: ryanjbaxter
The problem is that because the logging is configured in the application.yaml
and the spring.config.import
statement fails Spring Boot fails to load the logging configuration. If you configure the logging in your logback configuration you will see the logging.
Unfortunately there is nothing we can do about this unless there are some changes in Spring Boot (see https://github.com/spring-projects/spring-boot/issues/34559).
Comment From: spring-cloud-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-cloud-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.