I deployed a toy program to a VM instance running on Google Compute Engine (GCE). This toy program happens to log formatted error messages to the standard error stream (stderr). The VM instance has Stackdriver logging enabled and I am able to see some of my program's error messages interspersed with many other messages which are presumably generated by GCE itself.
Is it possible to filter the Stackdriver log viewer to display only the messages sent from my VMs standard error stream to simplify troubleshooting?
Ideally I would prefer not to rely on any client libraries, for simplicity. I've considered creating a filter to match on a special unique token that I could inject from an environment variable but that seems complicated for what seems like an easy task (viewing standard log messages).
The log messages look like this:
2018-10-20T16:03:31.262075836Z | listening for https at "localhost:443"
2018-10-20T16:03:31.257283434Z | foo
2018-10-20T16:03:32.012318385Z | bar
2018-10-20T16:03:38.119439321Z | ERROR: something bad happened
2018-10-20T16:03:38.127334354Z | FATAL: program terminated