The startup info messages should appear regardless of the existence of a bootstrap being utilitzed.
This code in SpringApplication#prepareContext inhibits the logStartupInfo(boolean).
if (this.logStartupInfo) {
this.logStartupInfo(context.getParent() == null);
this.logStartupProfileInfo(context);
}
context.getParent() is the bootstrap context when this dependency is included. It is null otherwise.
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-kubernetes-fabric8-config</artifactId>
</dependency>
I am using
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.8</version>
<relativePath/>
</parent>
with these related versions
<spring-cloud-gcp.version>3.2.1</spring-cloud-gcp.version>
<spring-cloud.version>2021.0.0</spring-cloud.version>
spring-cloud-starter-kubernetes-fabric8-config ends up being version 2.1.0
Comment From: wilkinsona
The intention is that the parent context will have logged the startup info. If that's not happening, the fix should address the behaviour in the parent context rather than potentially duplicating the logging by performing it in the child as well.
Can you please provide a complete yet minimal sample that reproduces the problem?
Comment From: fedup41
As is, this sample project does not show the "starting" log. Delete the spring-cloud-starter-kubernetes-fabric8-config dependency and it shows up.
Comment From: wilkinsona
Thanks for the sample. The startup info is not being logged because it's been switched off in Spring Cloud's bootstrap support. Please raise a Spring Cloud Commons issue for this. We can't change the behavior in Boot without introducing the risk of unwanted duplicate logging.