Runtime logs
Runtime logs are the default:[timestamp] [level] message, oldest first. The level is best-effort and can be inaccurate on stack traces; a multi-line error arrives as several separate entries.
Invocation logs
Use--type invocations for platform-generated request records:
console.log. Each record includes request metadata such as timestamp, HTTP method, path, status code, duration, request and response size, and serving region when available.
--since, --last, and --json work the same way for both log types. --since defaults to 1h and is capped at 24h; --last defaults to 50 and is capped at 250. Results are returned oldest first.
The API exposes both streams through GET /v2/compute/funcs/{id}/logs with type=runtime or type=invocations. See the API Reference.
Tail logs live
Requires CLI v0.5.3 or newer.
--tail switches from the default read-a-window-and-exit behavior to a live stream: the CLI stays attached and prints new log lines as the platform receives them, until you press Ctrl-C. The stream is delivered over a WebSocket direct from the ingest pipeline — there is no polling and no history: only lines written while you are attached arrive.
In tail mode,
--since and --last are meaningless (there is no history to page through) and are silently ignored. --type means something different here than in the one-shot read: an unset --type shows both runtime and invocation lines, interleaved as they arrive; pass --type runtime or --type invocations to filter to one kind. With --json, each line is one JSON object in the shape of the record that arrived.
If the connection drops, the CLI reconnects with capped backoff and keeps streaming.
Emit custom events to a sink you run
Runtime and invocation logs cover platform-retained logs. If you also need application-specific structured events in your own system, send them over HTTPS to a collector you control. Store the collector credential as a secret, never in code. Declare the secret infunc.toml: