Search code examples
google-cloud-run

How can I stream logs from a cloud run service to my terminal?


Is it possible to stream logs from my Cloud Run service into my terminal? I have found a query that works using gcloud logging read ... but it takes about 20 seconds to run and it exits after printing the current logs, whereas what I want is to keep watching for new logs and printing them.

My service is only being used by me at present so it generates very few logs.


Solution

  • gcloud beta run services logs tail SERVICE_NAME https://cloud.google.com/run/docs/logging#viewing-logs-gcloud