[Solved] How to use google-api-client for Google Cloud Logging

[ad_1] This is less easy to find because many of Google’s Cloud (!) services now prefer Cloud Client libraries. However… import google.auth from googleapiclient import discovery credentials, project = google.auth.default() service = discovery.build(“logging”, “v2”, credentials=credentials) Auth: https://pypi.org/project/google-auth/ Now, this uses Google Application Default credentials and I recommend you create a service account, generate a key … Read more