runs logs

Retrieve log bytes for a run or a task

Synopsis

omics workbench runs logs [RUN_ID|LOG_URL]
  [--max-bytes=NUMBER]
  [--offset=NUMBER]
  [--log-type=LOG_TYPE]
  [--task-id=TASK_ID]
  [--output=PATH] 

Description

Retrieve log bytes for a run or a task and stream to the console. The content of Run level logs are engine and environment dependent and may not always be present.Task-level logs often contain the log output generated from the execution of the task itself and can be helpful for debugging a task.

Examples

Retrieve the workflow level stdout logs for a given run and print it to the console.

omics workbench runs logs e5ed2c8f-d570-42db-a897-0861d7f828d2

You can easily switch to streaming the stderr logs instead of the stderr.

omics workbench runs logs --log-type stderr e5ed2c8f-d570-42db-a897-0861d7f828d2

If you would like to retrieve the logs for a given task, you first will need the task_id. The task_id can be retrieved using the runs tasks list command:

TASK_ID=$(omics workbench runs tasks list --run e5ed2c8f-d570-42db-a897-0861d7f828d2 | jq '[.tasks[] | .task_id][0]')

Once you have the task_id, you can then use it in the logs command to retrieve the task level logs.

omics workbench runs logs --task-id "${TASK_ID}" e5ed2c8f-d570-42db-a897-0861d7f828d2

Positional Flags

[RUN_ID|LOGURL]

Flags

--max-bytes=NUMBER

Limit the number of bytes to retrieve from the log stream.

--offset=NUMBER

Skip over N bytes in the log-stream, allowing you to jump into a random part of the log.

--log-type=LOG_TYPE

Toggle whether to write the associated stderr or stdout to the output. If this value flag is not specified the default is stdout.

Valid choices: stdout, stderr

--task-id=TASK_ID

If specified, retrieve the logs for a given task within a run. The task_id can be retrieved from the runs tasks list command.

--output=PATH

If specified, attempt to write the stderr or stdout logs to the given file path. If the file exists, the command will exit without overwriting it.

In order to get the logs for a specific task, you can first use the runs tasks list command to retrieve a list of task IDs. tasks?

Last updated

© DNAstack. All rights reserved.