query tool to an append-only NDJSON (newline-delimited JSON) file. This gives you a full audit trail of what the AI asked your database.
Enabling audit logging
Use the--audit-log CLI flag:
NDJSON schema
Each line is a JSON object with these fields:Example log entries
Analyzing logs with jq
Notes
- Audit logging is best-effort — if a write to the log file fails, the query still completes. This ensures audit I/O never blocks your database queries.
- Only
querytool calls are logged (including queries withexplain: true). Schema discovery tools (discover,describe_table) are not logged since they don’t execute user-supplied SQL. - The log file is opened in append-only mode. Isthmus never truncates or rotates the file — use external log rotation (e.g.
logrotate) for long-running deployments.