we are using gcloud logging read command to inspect the logs of a Cloud Run service. we want this command to act like the tail -f command which does not exit once it reaches the end of the stream but waits for new messages to appear and then displays them to the console. gcloud logging read exits when it reaches the end of the log. is there any flag using which we can tell it to wait for new log messages and not exit?
Solved! Go to Solution.
Hello,
According to your question, I'd like to suggest using the gcloud beta logging tail command. You can check Google Documentation to obtain more information about logging tail, Also, to enable this feature check this Google Documentation. Additionally, I want to share with you gcloud logging read Google Documentation that describes how you can define limits when you read a log for example to read up to 10 log entries in your project's syslog log.
I hope you will find this information helpful.
Hello,
According to your question, I'd like to suggest using the gcloud beta logging tail command. You can check Google Documentation to obtain more information about logging tail, Also, to enable this feature check this Google Documentation. Additionally, I want to share with you gcloud logging read Google Documentation that describes how you can define limits when you read a log for example to read up to 10 log entries in your project's syslog log.
I hope you will find this information helpful.