Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

GCP Batch view per-task log

Hi, is there a way where I can

1.see the list of tasks showing its status and

2. can click on each task to view its logs (stdout/stderr)?

Right now I am using EVENTS->LOGGING->LOG EXPLORER and it just dumps the text payload of all the tasks in a job. This makes the users very hard to view the logs of any single task.

2 REPLIES 2

Could some staff members help us with this? I am pretty sure this is a need that all users have to view per-task log.  @Wen_gcp  @wenyhu @bolianyin @Shamel  Thanks! 

@gradientopt Each log entry generated by Tasks should have a task_id label under "resources>labels". You can find the the task_id (for example, "task/job-lmtn8fzd-db7100df-93d3-4563-8a1c-0-group0-1/0/0") and use that in the Log Explore query to filter only log entries for that particular task.