You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration/config.mdx
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,9 @@ text = "System maintenance scheduled for Sunday 2am UTC"
33
33
link = "https://status.example.com"
34
34
color = "#7c3aed"
35
35
36
+
[general.audit]
37
+
retention_days = 30
38
+
36
39
[branding]
37
40
logo = "https://example.com/your-logo.svg"
38
41
logo_link = "https://internal.example.com"
@@ -164,6 +167,19 @@ link = "https://status.example.com"
164
167
color = "#7c3aed"
165
168
```
166
169
170
+
## Audit Log
171
+
172
+
Controls in-memory retention for the [Audit Log](/features/audit-log) page. Audit events are always emitted to stdout; this section only controls how long entries stay available in the running pgconsole process.
173
+
174
+
| Field | Description | Required |
175
+
|-------|-------------|----------|
176
+
|`retention_days`| Positive integer number of days to keep audit entries in memory. When omitted, entries are retained indefinitely until server restart. ||
Copy file name to clipboardExpand all lines: docs/features/audit-log.mdx
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,20 @@
2
2
title: Audit Log
3
3
---
4
4
5
-
pgconsole emits audit logs as JSON lines to stdout, allowing you to capture and process them with your existing log infrastructure.
5
+
pgconsole emits audit logs as JSON lines to stdout, allowing you to capture and process them with your existing log infrastructure. It also keeps connection-scoped audit entries in memory so admins can inspect recent activity from the `/audit-log` page.
6
+
7
+
## In-App Audit Log
8
+
9
+
The `/audit-log` page shows SQL execution and data export entries for the selected connection, newest first. Viewing entries requires `admin` permission on that connection.
10
+
11
+
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:
12
+
13
+
```toml pgconsole.toml
14
+
[general.audit]
15
+
retention_days = 30
16
+
```
17
+
18
+
See the [configuration reference](/configuration/config#audit-log) for details.
0 commit comments