Guides

Debug with logs

Use RawTree logs to diagnose inserts, queries, and agent runs.

Debug with logs

RawTree records insert and query activity so humans and agents can understand what happened after a command or API call.

Recent activity

rtree logs --since 1h --limit 50

Failed inserts

rtree logs --since 1h --type insert --status error

Failed queries for one table

rtree logs --since 1h --type select --status error --table events

Machine-readable logs

rtree logs --since 1h --status error --json

Use this form for agents and CI jobs. Log entries include the query, status, exception, rows, duration, tables, projections, and hints.

API logs

START_TIME="2026-04-24T10:00:00Z"
END_TIME="2026-04-24T11:00:00Z"

curl "https://api.rawtree.com/v1/logs?start_time=$START_TIME&end_time=$END_TIME&search=type:insert%20status:error" \
  -H "Authorization: Bearer $API_KEY"

Supported search filters:

  • type:select
  • type:insert
  • status:success
  • status:error
  • table:events,audit

Agent pattern

When an insert or query fails, run:

rtree logs --since 1h --status error --json

Then use the exception and hints fields to decide the next command.