DevOps Blog - Nicolas Paris

Search Words with Google Cloud Logs Explorer

GCP

This is a quick way to filters words in the Google Cloud Platform Logs Explorer, I used to struggle with this one.

Just add the "~" after the equal sign will open the RegExp world.

With this example, you will filter out warning to get only php errors with ERROR severity.

resource.labels.container_name="my application"
-textPayload=~"PHP Warning:  Undefined property"
textPayload=~"php:error"
severity>=ERROR

The example speak to himself.