Regular Expressions in Google Cloud Console Logging

speedplane picture speedplane · May 13, 2016 · Viewed 12.5k times · Source

How do you search Google App Engine logs in the new Cloud Console using regular expressions?

This blog post suggests you just need to type regex:my.*query to search, but that does not seem to work in the logging console. When I do that, it auto-corrects to the following query text:regex:my.*query.

Answer

Shashank Vivek picture Shashank Vivek · Dec 14, 2018

Although, I am late here but you can do it in stackdriver.

=           # equal
!=          # not equal
> < >= <=   # numeric ordering
:           # "has" matches any substring in the log entry field

In case, you want to find all GET response with 500 in textPayload , you need to add in filters:

textPayload:"500"

To search all zone with central1 in it:

resource.labels.zone:"-central1-"

That's it. You can refer this link for more advance filters