CLI automation and logging¶
Use JSON results when another program consumes the command, a report when you need a saved outcome, and JSON progress when you need to monitor a running render. For ordinary terminal rendering, use Render with the CLI.
Capture a result and report¶
Start with an existing project.json and accessible media. Check it before the
render so a failure stops the script before encoding:
After validation succeeds, run the command below. It protects an existing
final.mp4, but replaces render-report.json after a successful report write,
including a report of a render failure:
Check the exit code before reading the result as a success. This creates
final.mp4 in the current directory and refuses to replace an existing video.
The report path is replaced on a successful report write, including a report
of a render failure. Choose a path separate from the project, media and output;
see report path protection.
Monitor a render¶
This alternative writes one event per line and a final JSON result envelope to
render-events.jsonl; shell redirection replaces that log file:
monitored.mp4 must not already exist. The stdout file is a JSONL stream rather
than one JSON document. Distinguish lifecycle events from the final command
result; a failure before rendering starts may produce diagnostics without a
render lifecycle. Progress reaching the final frame does not establish success:
wait for publication and the final command outcome.
| Channel | Contains | Use it for |
|---|---|---|
Final result (--format json) |
Success or failure envelope, diagnostics and warnings. | Decide whether the command succeeded. |
Progress (--progress json) |
Typed RenderEvent lifecycle on stdout. |
Update an application or process monitor. |
Report (--report PATH) |
Saved structured success or failure outcome. | Retain timings, backend data and failure context. |
| Tracing (stderr by default) | Operational messages filtered by verbosity or RUST_LOG. |
Investigate a failure or performance issue. |
The CLI reference records which combinations share stdout and which send the final result to stderr.
Set log detail¶
ve writes tracing logs to stderr. The default verbosity is WARN. Each -v
raises the default level:
Set RUST_LOG when you need explicit tracing filters. It replaces the
verbosity-derived filter, so a command such as this can focus on one target:
The stable application targets are:
vestra
vestra.project
vestra.render
vestra.render.cpu
vestra.render.wgpu
vestra.media
vestra.media.probe
vestra.media.image
vestra.media.video
vestra.media.audio
vestra.encode
vestra.output
vestra.cache
vestra.performance
Examples:
RUST_LOG=vestra=info ve render project.json
RUST_LOG=vestra=warn,vestra.render.wgpu=debug ve render project.json
RUST_LOG=warn,vestra.performance=debug ve render project.json
operation_id, stage, output, requested_backend,
actual_backend, total_frames, and elapsed timing fields where applicable.
The root render span uses the same operation_id as the native RenderEvent
stream, and child records inherit that context in both human and JSON output.
Log lines are formatted conceptually as:
The exact field set depends on the event. Logs stay on stderr so stdout can be used for command results or JSON progress.
Human tracing logs use stderr, or the configured file destination; they never
contaminate normal command stdout. The shared observability infrastructure
supports human-readable logs, JSON Lines logs, stderr, file, and stderr-plus-file
output. JSON tracing logs are separate from --progress json, which is a
RenderEvent stream. --progress json remains a stdout result/progress stream;
it does not select the tracing format.
When JSON tracing owns stderr, native terminal progress is disabled for that same terminal coordinator, including explicit terminal progress, so stderr contains only valid JSON Lines records. JSON tracing sent only to a file leaves native stderr progress available. This is an application-boundary policy; the progress crate does not inspect logging formats.
The vestra.performance target emits one compact render timing summary per
successful render. It includes operation identity, the actual backend, numeric
project parse, validation, preflight, plan compilation, audio analysis, asset
decode, track evaluation, frame render, encoder write/finalize, publication,
and total timings. WGPU renders additionally report adapter/device/pipeline,
texture upload, command encoding, submission, readback, and row repack timing.
Use RUST_LOG=warn,vestra.performance=debug to enable it.
Trace-level preparation records carry authored layer_id, clip_id,
effect_id, mask_id, and transition_id fields where those objects enter
execution. Audio track identifiers are not forced through the renderer until
the audio execution boundary has a stable authored-to-runtime mapping.
Progress modes¶
render accepts --progress auto, --progress terminal, --progress json,
and --progress none. Auto is the default. terminal forces the native
terminal presentation; json emits the machine-readable event stream; none
disables progress.
Human progress reports percentage and completed versus total frames. Once
enough samples exist it also shows rolling render FPS and an ETA. On a TTY it
updates a terminal line. Auto uses native terminal progress only with
interactive stderr; redirected stderr, CI, TERM=dumb, and unsupported
terminals receive no native human progress. Completion reports the rendered
frame count, elapsed time, and output path. Logs coordinate with the active
display so a log does not permanently destroy the progress line.
JSON progress writes one JSON object per line to stdout for the complete typed
lifecycle: started, stage_changed, progress, and one terminal event
(completed, cancelled, or failed). Use it for a process monitor or
pipeline. --progress none suppresses progress events while leaving logs and
the final command result under their normal format rules.
When --progress json is combined with --format json, progress events and the
final result form one JSONL stream on stdout. With --format human, the JSON
progress remains on stdout and the human final result goes to stderr, keeping
stdout machine-readable. This does not change the independent tracing policy
described above.