gcloud-logging-slf4j-logback icon indicating copy to clipboard operation
gcloud-logging-slf4j-logback copied to clipboard

Difference between gcloud-logging-slf4j-logback and google-cloud-logging-logback?

Open ghost opened this issue 5 years ago • 1 comments

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.

ghost avatar Sep 13 '19 14:09 ghost

@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.

philicious avatar Oct 03 '19 00:10 philicious