Reputation: 1698
I have a Craft CMS application deployed on Google App Engine Standard.
I need to view the logs written from the application to debug a 503 error which I suspect is due to a failed database connection.
Google App Engine cannot write files to the application and gives instructions to write everything to /tmp
I found one of their tutorials saying to use:
$dir = sys_get_temp_dir();
So I'm writing there. On the dashboard, the logs only give the HTTP code, but I need the actual error written from craft which is usually in storage/logs/web.log
How can I find /tmp
on GAE via their console?
Upvotes: 2
Views: 265
Reputation: 71
App engine Standard is containerized in a way that you don't actually have access to the infrastructure running the application and it's files, as it is fully manged.
The logs that your application generates are visible from Stackdriver Logging, on Stackdriver there are some logs that are nos visible by default, however under the logname you can select all logs.
Also if you want to set a special output for the logs only some outputs are available on the selector therefor the standard output is the recommended to use.
Upvotes: 1
Reputation: 1079
You should write your logs to the standard output rather than a file. That way, stackdriver will be able to pick them up which you will be able to query later in GCP.
Upvotes: 1