How do I set up logs with Symfony on GCP?

  google-cloud-platform, symfony

I have a PHP Symfony app that I am running on the Google Cloud Platform standard environment.

When I run the server locally, I can make logs via the normal Symfony way and they show up in my console. So for example:

$logger->error("This is what an error looks like");

displays in the console as

May 7 21:38:55 |ERROR| APP This is what an error looks like

But when I upload to GCP, the error messages don’t appear in the logs viewer. Is there something I have to do to set up error logs for the Google Cloud Platform Console?

Source: Symfony Questions