I am using Google Cloud Scheduler to call a php script on my remote server via HTTP (Target = HTTP). Nothing fancy, the script literally just echos "status:success"
However I am struggling to see the return payload of my php script within the Scheduler Logs.
I can see the status was 200 within the log, but that's all - no way to see what message/payload my script returned. Which will make my future debugging very difficult.
{
httpRequest: {
status: 200
}
insertId: "*****"
jsonPayload: {
@type: "type.googleapis.com/google.cloud.scheduler.logging.AttemptFinished"
jobName: "projects/*****/locations/europe-west2/jobs/Test"
targetType: "HTTP"
url: "https://*****/cloudscheduler.php"
}
logName: "projects/*****/logs/cloudscheduler.googleapis.com%2Fexecutions"
receiveTimestamp: "2022-01-27T14:16:27.194140494Z"
resource: {
labels: {
job_id: "Test"
location: "europe-west2"
project_id: "*****"
}
type: "cloud_scheduler_job"
}
severity: "INFO"
timestamp: "2022-01-27T14:16:27.194140494Z"
}
Am I overlooking something? Or does google logs not store the returned messages? Thanks.
You're correct, google doesn't store the returned payload. Only cares about the status of the call whether it was successful or not. If the app is hosted on Google cloud, you can log the payload (or print to console), then it will be visible in your logs viewer.