Find logs fast with new "tail -f" functionality in Cloud Logging

Set your 2021 API resolutions with these top 2020 posts
January 5, 2021
Red Hat to Acquire Kubernetes-Native Security Leader StackRox
January 7, 2021
Set your 2021 API resolutions with these top 2020 posts
January 5, 2021
Red Hat to Acquire Kubernetes-Native Security Leader StackRox
January 7, 2021

When you’re troubleshooting an app or a deployment, every second counts! Cloud Logging helps you troubleshoot by aggregating logs from across Google Cloud, on-premises or other clouds, indexing, aggregating logs into metrics, scanning for unique errors with Error Reporting and making logs available for search, all in less than a minute. And now, we’ve built two new features for streaming logs to give you even fresher insights from your logs data.

By popular demand from Linux users, we added a new tool to mimic the behavior of the tail -f command, which allows you to display the contents of a log file to the console in real time. We’ve also included upgrades beyond the well-loved tail tool such as searching across all logs from all your resources at once and the ability to use Cloud Logging’s powerful logging query language including global search, regular expressions, substring matches, etc., all still in real-time.

You can use the logging query language with the new live feature to find information in your logs in real-time. For example, let’s say you just deployed a new application and want to look at all error logs:

gcloud alpha logging tail "severity>=ERROR"

But this returns too many results so you narrow the scope to just logs that include the text “currency”:

gcloud alpha logging tail "severity>=ERROR AND currency"

This search returns a meaningful set of logs, all still in real time.

Leave a Reply

Your email address will not be published. Required fields are marked *