Get Logs
get_logsYour FIRST step when debugging any runtime problem — a 500, a failed request, a blank page, or 'it doesn't work' from the user. Call this before theorizing from an error message alone. Reads the project's runtime logs. source 'server' (default): the dev backend's request logs from the last hour — method, URL, status, duration, and per-request server log lines (pass log_reference_id from a previous listing for one request's full logs); includes background jobs (queueTask/scheduled/failure). source 'browser': console output AND client-side network requests (each fetch as ⇄ METHOD url → status, with the error body for failed/4xx/5xx ones — the client-side view server logs miss, e.g. CORS/timeouts/third-party calls) captured from the user's open editor session. A browser network line's ref=<id> is a log_reference_id you can pass back with source 'server' for that request's full server logs. Empty if no editor is open. source 'background': not log lines but the live state of background work, for the preview AND the published app — the schedules actually deployed (scheduled jobs, recurring and delayed queueTask) with their next run, the runs in progress right now, and the runs that were long or cut off at the 15-minute limit in the last 7 days. Use it to answer 'is that job still running?', 'did it time out?' and 'can anything start it again?' (limit and log_reference_id are ignored). Sources 'server' and 'browser' are NOT CloudWatch: entries live ~1 hour and cover the dev backend + live session only — for the PUBLISHED app's logs, use run_code_in_vm's _floot.getProdBackendLogs (details: get_guides('prod-backend-logs')).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| source | No | ||
| projectId | Yes | ||
| log_reference_id | No |