Playgrounds Logs
[MODE:DIALOG] Read-only, idempotent. Tier: brownfield.
Live log collection requires a funded Marquee and returns MARQUEE_NOT_FUNDED when unpaid.
One-shot service log fetch through async POST /api/playgrounds/:id/logs; the SDK sends service in the request body, polls the resulting request_id, and returns the final payload.
When to use
- Debug a specific service's startup error.
- Read a known-bounded chunk (
taillines) before deciding whether to follow. - Pair with
fibe_playgrounds_debugfor full context (debug surfaces names; logs surface causes).
When NOT to use
- Need to wait for a pattern to appear — use
fibe_logs_follow. - Need debug summary, not raw logs — use
fibe_playgrounds_debug.
Inputs
| Field | Type | Required | Notes |
|---|---|---|---|
id_or_name | string | yes | Playground numeric ID or slug-safe name |
service | string | no | Compose service name. Omit to return all services |
tail | number | no | Lines to fetch; default 50, clamped to a server-side maximum |
Output
{
"id_or_name": "42",
"service": "web",
"tail": 200,
"logs": "...", // raw mixed stdout+stderr
"stdout": "...", // present when fetcher separates streams
"stderr": "...",
"fetched_at": "2026-..."
}
Schema varies slightly by Marquee Docker version; the logs field is always populated.
Behavior
- Fibe validates
serviceagainst the Playspec's declared services (rejects unknown). - Clamps
tailto the server-side maximum. - Enqueues a log-snapshot job (the worker SSHes to the Marquee and runs
docker logs --tail <N>). - Returns request_id + status_url; the SDK polls.
Gotchas
- "Service not found" usually means a typo — service names come from the Playspec's
services[*].name, not always the Compose service name (Fibe sometimes prefixes/normalizes). - Marquee unreachable → polling eventually returns an error envelope. Re-check Marquee status.
- Logs may be truncated by Docker's own log driver (
max-sizeetc.);tailis best-effort. - Container restarts reset stdout/stderr buffers — recent crashes may have logs that no longer exist.
Related
fibe_playgrounds_debug— names + ports + per-service status.fibe_logs_follow— live streaming with pattern matching.fibe-debugskill — broader troubleshooting recipes.