Skip to content

Logs

tori logs reads retained application stdout and stderr for the app in ./tori.json. Platform and queue-proxy lines are not in this stream. Static sites have no process, so a static app’s log range is usually empty even when storage is healthy.

Terminal window
npx tori.host logs --since 1h --limit 500
npx tori.host logs --follow

See tori logs for flags. In the console, open the app → logs.

One-shot reads show the latest matching lines in chronological order. --since accepts seconds, minutes, or hours (1s–24h, default 15m). --limit is 1–500 (default 200).

--follow polls every three seconds. Ctrl-C stops it. Each poll replays a 30-second window so a line that landed late still appears. There is no delivery guarantee for a queued record that arrives after that overlap: pause follow and run a historical read with a wider --since.

The console offers 15 minutes, 1 hour, or 24 hours, follow, refresh, and older pages. It keeps at most 2,000 lines on screen.

Each successful logs response includes retentionDays. On the launch zone this is 7 days. Lines older than that window are gone (HTTP 410, logs_retention_expired). The window is a store setting, not a plan column; read it from the response rather than from memory.

No matching lines in range is HTTP 200 with an empty list. The CLI prints No logs in this time range. Missing storage is a different error (logs_unavailable, HTTP 503). Do not treat an empty range as an outage, and do not treat an outage as “the app printed nothing”.

Follow stops with an explicit error if the store is unavailable. Refresh to resume. Token revocation is checked on every poll; a revoked token ends follow.

Application output is untrusted. The CLI escapes terminal control characters.

Terminal window
start=$(date -u -v-15M +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -u -d '15 minutes ago' +%Y-%m-%dT%H:%M:%SZ)
end=$(date -u +%Y-%m-%dT%H:%M:%SZ)
curl -sS -H "Authorization: Bearer $TORI_TOKEN" \
"https://api.tori.host/api/apps/<slug>/logs?start=${start}&end=${end}&limit=200"

Query parameters, cursors, and error codes: API reference (listLogs). Maximum range is 24 hours; limit is 1–500.

Download this page as Markdown.