Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View the arguments of a POST-Request in Google App Engine logs

I have a server running over Google App Engine.

I am viewing my server's request-log via the console.

They are located under Google Cloud Platform --> Stackdriver Logging --> Logs.

I would like to view the arguments of a POST-Request.


With a GET-Request it is easy, as they are visible in the title of the entry.

They are also viable in the body of the entry, under protoPayload --> resource.

With a POST-Request, however, they are nowhere to be found.

Here are my options:

  • metadata
  • protoPayload
  • insertId
  • log
  • httpRequest
  • operation

None of these options seem to contain the arguments of the request.

From this answer, I understand that they should be within the request-body.

How can I find them within GAE logs?

like image 952
barak manos Avatar asked Jun 27 '16 13:06

barak manos


People also ask

What are the 3 options Google offers for viewing and interacting with your logs?

Download logs: Download logs from your query results. Hide similar logs: Hide large amounts of similar logs from your query results. Trace data: View trace details and refine your query based on the trace. For more information, see View trace data.

How do I view Google API logs?

From the All logs drop-down list, select compute.googleapis.com/activity_log to see Compute Engine activity logs.

How do I check Gcloud logs?

Viewing logs in Cloud RunGo to Cloud Run. Click the desired service in the displayed list. Click the LOGS tab to get the request and container logs for all revisions of this service. You can filter by log severity level.


1 Answers

post request data isn't shown in request logs.

In your app, you must explicitly log it

logging.log(myRequest.PostData)

Edit: just be careful logging sensitive customer information.

like image 109
robert king Avatar answered Oct 20 '22 00:10

robert king