Pantheon\Terminus\Commands\Workflow\Info\LogsCommand::logs PHP Method

logs() public method

Show all details for a workflow, including operations
public logs ( string $site_id, $options = ['id' => null] )
$site_id string Name or UUID of the site that the workflow belongs to
    public function logs($site_id, $options = ['id' => null])
    {
        $operations = $this->getWorkflow($site_id, $options['id'])->operations();
        if (count($operations)) {
            $output = '';
            foreach ($operations as $operation) {
                if ($operation->has('log_output')) {
                    $output .= sprintf("\n------ %s ------\n%s\n", $operation->description(), $operation->get('log_output'));
                }
            }
            if (!$output) {
                $this->log()->notice('Workflow operations did not contain any logs.');
            }
            return $output;
        } else {
            $this->log()->notice('Workflow does not contain any operations.');
        }
    }
LogsCommand