Reputation: 7219
I have this Spring Boot application deployed on a kubernetes cluster on GCP.
Logs are sent to stackdriver and I can't see them on logging section as you can see below:
But they have the wrong severity (INFO) on the platform, that means they don't appear on the error reporting section.
My question is what is needed to be configured to get logs produced by a spring boot application to be read properly by Stackdriver.
Upvotes: 4
Views: 3243
Reputation: 56
Could you provide your logging code?
In the meantime, there's a Google-supported Spring Boot Logging integration, and here's a sample of that: https://github.com/spring-cloud/spring-cloud-gcp/blob/master/spring-cloud-gcp-samples/spring-cloud-gcp-logging-sample/src/main/java/com/example/ExampleController.java
This sample uses a org.apache.commons.logging.Log
, so you could do Log.error().
Upvotes: 3