Skip to main content
Isthmus can log every query executed through the 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:
Or in your MCP client config:
The file is created if it doesn’t exist, and appended to if it does.

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 query tool calls are logged (including queries with explain: 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.