Logs in Studio
Use Logs to inspect events across your hosted project's services. For SQL queries through Explorer, MCP, or the API, see Query logs with SQL.
Find events #
- Open Logs.
- Set the Time Range in the sidebar, or select a range on the timeline.
- Select one or more Log Type values.
- Add filters in the filter bar, or type text to search event messages.
- Select a row to inspect the event.
Without a log type selection, Logs queries Postgres and API Gateway. Selecting types replaces this default set. The timeline groups events by success, warning, and error.
Filter events#
| Filter | Behavior |
|---|---|
| Log Type | Select API Gateway, Postgres, Auth, Storage, PostgREST, Edge Function, Realtime, or pooler events. |
| Level | Match success, warning, or error. |
| Status | Match an HTTP status or Postgres SQLSTATE. |
| Method | Match an HTTP method. |
| Pathname | Match a request path. |
| Event message | Use iLike or Not iLike for case-insensitive text matching or exclusion. Plain text matches anywhere in the message; % specifies a wildcard pattern. |
| User | Match the user's ID in Auth actor IDs or API Gateway JWT subjects. Other log types cannot match this filter. |
Filters other than Event message and User support Equals and Not equal. User supports Equals. Included values within a field match any selected value; exclusions remove every selected value. Filters on different fields must all match.
Gateway and service logs#
The nested service toggles under API Gateway include or exclude gateway request paths. Selecting the separate Auth, Storage, or PostgREST log type retrieves that service's own logs. These are different events.
For SQL source names, see the Log field reference.
Postgres #
Postgres logs contain database activity and errors. Connection events appear when connection logging is enabled. Clear Connection logs under Postgres to hide them.
To record additional statement classes, see Configure statement logging.
Inspect an event #
Select a row to open its detail panel. Overview, when available for the log type, shows service details. Raw JSON shows the event data. Dock the panel at the bottom or on the right.
Edge Function invocations can include associated console output. In SQL, invocation events use function_edge_logs and console events use function_logs.
Watch, share, and export#
- Select Live to fetch new events automatically. Select it again to pause. Starting live mode clears the fixed time range and sort; selecting a time range or sort stops live mode.
- Copy the page URL to share the current filters. Recipients need access to the project.
- Open Download logs, choose CSV or JSON, and select a result limit of 100, 500, or 1,000 rows. The export applies the current filters. Without a fixed time range, choose the duration to retrieve.
For continuous export, use Log drains.
Missing results #
Check the time range, selected log types, and exclusions first. User combined with only Postgres or another unsupported type returns no matches. An empty result does not establish that the user had no activity.
Events must be recorded before they can appear in Logs. See Configure logging and the source limitations.
Retention depends on your pricing plan. See Manage Logs usage for billing details.