Describe the bug
Setting spring.cloud.gcp.core.enabled=false causes the application to fail on startup because LoggingWebMvcConfigurer cannot be instantiated since there is no GcpProjectIdProvider bean.
I would expect disabling GCP core to also disable Cloud Logging; however, this also requires setting spring.cloud.gcp.logging.enabled=false to prevent StackDriverLoggingAutoConfiguration from being processed.
I also noticed that LoggingWebMvcConfigurer doesn't even make use of the provided GcpProjectIdProvider so it's not clear to me why it's even needed.
Sample
- Create a Spring Boot application
- Add
spring-boot-starter-web and spring-cloud-gcp-starter-logging dependencies to the pom
- Add
spring.cloud.gcp.core.enabled=false to application.properties
Describe the bug
Setting
spring.cloud.gcp.core.enabled=falsecauses the application to fail on startup becauseLoggingWebMvcConfigurercannot be instantiated since there is noGcpProjectIdProviderbean.I would expect disabling GCP core to also disable Cloud Logging; however, this also requires setting
spring.cloud.gcp.logging.enabled=falseto preventStackDriverLoggingAutoConfigurationfrom being processed.I also noticed that
LoggingWebMvcConfigurerdoesn't even make use of the providedGcpProjectIdProviderso it's not clear to me why it's even needed.Sample
spring-boot-starter-webandspring-cloud-gcp-starter-loggingdependencies to the pomspring.cloud.gcp.core.enabled=falsetoapplication.properties