Skip to main content

orun logs

orun logs streams raw step output from an execution record.

Usage

orun logs

With no arguments, logs reads from the latest execution.

Common examples

Show all logs for the latest execution:

orun logs

Show logs for a specific execution:

orun logs run/my-plan-20240601-a1b2c3

Filter to one job:

orun logs job/api-edge-worker@production.deploy

Combine exec and job filters:

orun logs --exec-id my-plan-20240601-a1b2c3 --job api-edge-worker@production.deploy

Filter to a specific step:

orun logs --job api-edge-worker@production.deploy --step deploy

Slash notation

logs supports resource slash notation as positional arguments:

orun logs run/<exec-id>
orun logs job/<job-id>

Flags

FlagMeaning
--exec-idTarget a specific execution (defaults to latest)
--jobFilter output to a specific job ID
--stepFilter output to a specific step ID within the selected job
--failedShow only failed jobs or steps
--rawShow full raw logs instead of compact 8-line excerpts
--remote-stateFetch logs from orun-backend instead of local state
--backend-urlorun-backend URL for remote state (or set ORUN_BACKEND_URL)

Remote logs

When --remote-state is set, orun logs fetches job logs from the backend:

orun logs \
--remote-state \
--backend-url https://orun-backend.example.com \
--exec-id gh-12345678-1-a1b2c3 \
--job api@dev.deploy

Omit --job to fetch logs for all jobs in the run.

Log storage

Logs are written to .orun/executions/{exec-id}/logs/{job}/{step}.log during local execution. Each step's raw output is stored separately, making it easy to diff, archive, or forward logs from individual steps.

When running with --remote-state, logs are streamed to the backend during execution and retrieved via the backend API.