gcloud-logging-slf4j-logback
gcloud-logging-slf4j-logback copied to clipboard
Difference between gcloud-logging-slf4j-logback and google-cloud-logging-logback?
Hi. What is the difference between google-cloud-logging-logback-slf4j and Google's google-cloud-logging-logback? Doesn't https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-contrib/google-cloud-logging-logback already produce a JSON formatted log entry? Please bear with me if this question seems inexperienced. Greetings Carlo
P.S.: It seems like the website http://blog.malloc64.com/ linked in your profile is no longer working.
@CarloWakefield the google-cloud-logging-logback lib uses the Stackdriver Logging API to export the logs. This lib here logs to STDOUT, where GKE and GAE and CloudRun logs are collected from the docker containers by fluentd and then transformed to a LogEntry and send to the API.
So, if you run your application on GKE/GAE you have the choice but STDOUT is prefered as you save on calls to an API and also dont have to care about Credentials for using the API. If you run anywhere else and want to use Stackdriver Logging, you need to use the API.