Reference

apex logs

Stream or fetch logs for a run or job

apex logs [options] [command] [run]

With an API token, needs the permission actions:read.

Arguments
ArgumentDescription
[run]run id, #number, or "latest"
Options
OptionDescription
--repo <owner/repo>limit the run search to one repository
--job <name>one job by id, name, or name prefix (default: every job)
--followkeep reading until the run completes
--summaryprint what the log says about the tests it ran, instead of the log
--jsonprint the run and its logs as JSON

Examples

The newest run you can see, every job, as it finished.

apex logs latest

Follow one job of a run until it completes.

apex logs 4812 --job test --follow

Subcommands

apex logs delete

Delete every job’s log for a finished run — for everyone, and not undoable

apex logs delete [options] <run>

With an API token, needs the permission actions:write.

Arguments
ArgumentDescription
<run>run id, #number, or "latest" — required, never assumed
Options
OptionDescription
--repo <owner/repo>limit the run search to one repository