GoogleCloudPlatform / GoogleCloudPlatform/spring-cloud-gcp
Group logs by request Spring Boot - GCP
- Dominant language
- Java
- Stars
- 551
- Forks
- 349
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 14
Description
I have found several posts about this but none that really solve the problem, lot of them are really old
Technology used
- Spring boot: 3.3.3
- Java: 17
- Used log: lombok.extern.slf4j.Slf4j
- Gcp product: Google Cloud Run
Pom.xml dependecy
```
com.google.cloud
libraries-bom
${libraries-bom.version}
pom
import
com.google.cloud
spring-cloud-gcp-dependencies
6.1.0
pom
import
com.google.cloud
spring-cloud-gcp-starter-logging
com.google.cloud
spring-cloud-gcp-starter-trace
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-starter-actuator
org.springframework.restdocs
spring-restdocs-mockmvc
test
com.google.cloud
spring-cloud-gcp-dependencies
2.0.3
pom
import
com.google.cloud
spring-cloud-gcp-starter-storage
2.0.3
org.springframework.boot
spring-boot-starter-security
org.projectlombok
lombok
${lombok.version}
provided
com.fasterxml.jackson.datatype
jackson-datatype-hibernate6
2.15.0
com.fasterxml.jackson.module
jackson-module-mrbean
2.11.0
io.jsonwebtoken
jjwt
0.12.6
org.junit.jupiter
junit-jupiter-api
5.11.3
test
org.springframework.boot
spring-boot-starter-test
test
org.ow2.asm
asm
org.hamcrest
hamcrest-core
```
This is my logback-spring.xml
```
${projectId}
```
If I use `localdev` profile no problem, logs are shown in console and everything is ok.
When I deploy to CloudRun and then use the `dev` profile I have this set of strange logs when I start the spring instance:


And when i call my endpoint this is the result:

the logs are grouped, it is true, but what do all those warning messages during the start-up of the spring istance mean?
This is an example of my controller:

Can anyone help me?
Contributor guide
Assessment
This issue has not been assessed yet.