This article says to simply click view under the Logs column to see the output of Google Cloud Scheduler logs. However, while I can see the status code of a HTTP scheduled function, I cannot see the response. For instance, this request normally returns an array of objects, but this was the full log I got back from the Cloud Scheduler:
{
httpRequest: {
status: 200
}
insertId: "------"
jsonPayload: {
@type: "type.googleapis.com/google.cloud.scheduler.logging.AttemptFinished"
jobName: "projects/----/locations/us-west2/jobs/name"
targetType: "HTTP"
url: "http://endpoint.com/test"
}
logName: "projects/----/logs/cloudscheduler.googleapis.com%2Fexecutions"
receiveTimestamp: "2019-07-18T16:00:12.574419040Z"
resource: {
labels: {
job_id: "Name"
location: "us-west2"
project_id: "----"
}
type: "cloud_scheduler_job"
}
severity: "INFO"
timestamp: "2019-07-18T16:00:12.574419040Z"
}
How can I also view the response object/ text from a Cloud Scheduler request?
How can I also view the response object/ text from a Cloud Scheduler request?
Stackdriver does not log the HTTP Response body.
You will need to log to Stackdriver the HTTP Response that your function sends. This means addition Stackdriver functionality to your function code.
This link includes Stackdriver examples:
Logging Client Libraries
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With