Viewing logs in the dashboard
Open a branch in the Xata dashboard and select Logs in the branch sidebar to browse entries in a searchable viewer. From the Logs page you can:- Pick a preset or custom time range.
- Filter by level (
error,warning,info,debug), instance (primary or a specific replica), and process. - Search log message bodies with substring or regex matching.
- Click any entry to open a details panel with the full message and metadata.
- Use Refresh to fetch the latest entries for the current time range.
xata branch logs, which offers the same filters plus follow mode and raw, json, ndjson, and csv output. For anything else programmatic, such as shipping logs to an external observability tool, use the API described below.
Retrieving logs
Use thebranchLogs endpoint to fetch logs for a time range. The endpoint requires the logs:read scope on your API key.
logs array of entries and a nextCursor that you can pass back in a follow-up request to page through additional results.
Request parameters
Log entry fields
Filtering
Pass one or morefilters to narrow results. Each filter applies to a specific field with an op and either a value or values:
Supported operators:
in— match any value invalues(use withinstance,level,process).contains/icontains— substring match on the log body (case-sensitive / insensitive).regex/iregex— regular-expression match on the log body.
deadlock:
Credential redaction
Branch logs are scrubbed before they reach the API response. If aCREATE ROLE, ALTER ROLE, CREATE USER, ALTER USER, CREATE GROUP, ALTER GROUP, or CREATE/ALTER USER MAPPING statement appears in a log line, the statement is truncated at the PASSWORD keyword and the secret is replaced with <REDACTED>. This applies to both single-line and multi-line log records.
For example, a log line like:
password mentions outside role and user-mapping statements are left untouched.
Pagination
When a response includes a non-nullnextCursor, pass it back as cursor in the next request to fetch the following page. The start, end, limit, and filters should remain the same across paged requests.