Skip to content

Disabling Cloud GCP Core causes application start failure with Cloud Logging starter #3177

@jonblack

Description

@jonblack

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions