Skip to main content
pgconsole emits audit logs as JSON lines to stdout, allowing you to capture and process them with your existing log infrastructure. It also keeps audit entries in memory so they can be inspected from the /audit-log page.

In-App Audit Log

The /audit-log page has two tabs:
  • Connection — SQL execution and data export entries for the selected connection, newest first. Requires admin permission on that connection.
  • System — instance-level events that aren’t tied to a connection (auth.login / auth.logout), including the auth provider and source IP. Only visible to an instance owner, since these events span all users.
Entries are stored in memory only. They are lost when the server restarts. By default, pgconsole retains entries indefinitely while the process is running, so memory usage grows with audit volume. For high-traffic deployments, set retention_days to prune older entries:
pgconsole.toml
See the configuration reference for details.

Events

Log Format

All audit events are JSON objects with a common structure:

Common Fields

auth.login

auth.logout

sql.execute

data.export

Capturing Logs

Audit logs are written to stdout alongside other server output. Filter by "type":"audit" to capture audit events only: