Logs & exec
Both logs and exec work uniformly across container and process services.
Tailing logs
Section titled “Tailing logs”# Follow live logs (newest first)rune logs api --follow
# Last 100 lines, then exitrune logs api --tail=100
# Last 10 minutesrune logs api --since=10m
# Window: from 10m ago up to 5m agorune logs api --since=10m --until=5m
# Filterrune logs api --grep=errorBy default rune logs <name> aggregates across all instances of the service. To pin a single instance:
rune logs api-instance-7c2e8a3b# or with explicit type:rune logs instance/api-instance-7c2e8a3bUseful flags
Section titled “Useful flags”| Flag | Purpose |
|---|---|
--follow | Stream as logs arrive. |
--tail=N | Start with the last N lines. |
--since=DUR | Only logs after now - DUR. |
--until=DUR | Only logs before now - DUR. |
--grep=PAT | Server-side filter. Faster than piping through grep. |
--timestamps | Include timestamps in the stream. |
-o json | Structured logs (line-delimited JSON). |
Persistence
Section titled “Persistence”Today, runed streams logs straight from the runner — no log retention beyond what the container/process itself keeps. For longer retention, ship logs to RuneSight or a third-party log store (RUNE-074, roadmap).
Run a command inside a running instance:
# Interactive shellrune exec api bash
# One-off commandrune exec api ls -la /app
# Inspect a specific instancerune exec api-instance-7c2e8a3b ps aux
# With env and workdirrune exec api --workdir=/app --env=DEBUG=true python debug.py
# Non-interactive (no TTY)rune exec api --no-tty python script.py
# Bound timeoutrune exec api --timeout=30s python long-running.pyIf you pass a service name, Rune picks any healthy instance for you. Pass an instance ID to be specific.
When exec hangs
Section titled “When exec hangs”- The container has no TTY-capable shell — try
shinstead ofbash, or--no-tty. - Your terminal isn’t forwarding signals — run with
--timeoutto bound it. - The instance is
Unhealthy—rune health instance <id> --checkswill tell you why.
Common debugging recipes
Section titled “Common debugging recipes””My service is failing — why?"
Section titled “”My service is failing — why?"”rune get service apirune get instancesrune get instance <failing-id> -o yaml | grep -i messagerune logs <failing-id> --tail=200"Did my config update land?"
Section titled “"Did my config update land?"”rune exec api cat /etc/config/log-levelrune exec api env | grep LOG"Is the database reachable from the api?"
Section titled “"Is the database reachable from the api?"”rune exec api sh# inside:nc -zv postgres 5432curl -sv http://postgres:5432"Where are my mounted secrets?”
Section titled “"Where are my mounted secrets?””rune exec api ls /etc/secrets/dbrune exec api cat /etc/secrets/db/usernameSecurity note
Section titled “Security note”rune exec is gated by the exec verb on service (or instance). Restrict it in policies for non-on-call users — it’s effectively root inside the container.