Log Formats¶
All formats are auto-detected — by extension first, falling back to content inspection — so no configuration is needed.
stderr/syslog¶
Plain text format used with log_destination = 'stderr' or log_destination = 'syslog'.
2025-01-13 14:32:18 UTC [12345]: db=mydb,user=postgres LOG: duration: 145.234 ms statement: SELECT * FROM users WHERE id = 42
Supports various log_line_prefix configurations. The format is flexible and human-readable.
CSV¶
Structured format with log_destination = 'csvlog'. Fixed column structure with dedicated fields for timestamp, user, database, PID, client, severity, message, and query text.
2025-01-13 14:32:18.456 UTC,postgres,mydb,12345,192.168.1.100:54321,6384bef2.3039,1,SELECT,2025-01-13 14:30:00 UTC,2/1234,0,LOG,00000,"duration: 145.234 ms statement: SELECT * FROM users WHERE id = 42",,,,,,"SELECT * FROM users WHERE id = 42",,,"psql"
The dedicated query field (column 20) ensures complete SQL text capture.
JSON¶
JSON format from log_destination = 'jsonlog' (PostgreSQL 15+) or cloud providers (GCP Cloud SQL, AWS RDS). (Azure Database for PostgreSQL logs are stderr-formatted — see the Cloud Providers table below.)
{
"timestamp": "2025-01-13T14:32:18.456Z",
"user": "postgres",
"dbname": "mydb",
"pid": 12345,
"remote_host": "192.168.1.100",
"error_severity": "LOG",
"message": "duration: 145.234 ms statement: SELECT * FROM users WHERE id = 42",
"application_name": "psql"
}
Cloud-specific JSON schemas are automatically detected and parsed.
pgBackRest¶
pgBackRest's own log files, and its lines in a PostgreSQL stderr log, are recognized in any of the inputs above and feed a separate report; see pgBackRest.
Patroni¶
Patroni's own log files, in its text format (optionally behind a journalctl prefix) or its JSON format, are recognized by their content and feed a separate report; see Patroni.
pgBouncer¶
Logs from the pgBouncer connection pooler. They share PostgreSQL's timestamp [PID] SEVERITY prefix but carry pooler telemetry (stats: lines), client/server socket events, and pooler errors instead of SQL — so quellog detects them automatically and renders a dedicated pooler report rather than the PostgreSQL report.
2026-09-09 21:00:33.656 UTC [1] LOG stats: 17 xacts/s, 44 queries/s, 0 client parses/s, 0 server parses/s, 0 binds/s, in 1742 B/s, out 1641 B/s, xact 2384 us, query 944 us, wait 618 us
2026-09-09 20:59:13.571 UTC [1] LOG C-0x7f3b3ad2f3c0: app/app_user@10.89.0.4:35088 login attempt: db=app user=app_user tls=no replication=no
2026-09-09 20:59:13.575 UTC [1] LOG C-0x7f3b3ad2f3c0: app/app_user@10.89.0.4:35088 closing because: server login failed (age=0s)
See pgBouncer for the metrics and report layout.
Cloud Providers¶
quellog auto-detects log formats from managed PostgreSQL services:
| Provider | Format | Notes |
|---|---|---|
| AWS RDS / Aurora | stderr | Custom log_line_prefix with host, user, db in the timestamp line |
| Google Cloud SQL | JSON | Cloud Logging JSON envelope with insertId and timestamp fields |
| Azure Database | stderr | Session ID and severity in the timestamp line |
| CloudNative-PG | JSON | Kubernetes JSON wrapper around PostgreSQL CSV records |
No configuration needed — just point quellog at the log files.
Multiple Inputs¶
quellog accepts multiple files, glob patterns, and directories:
# Two days of logs
quellog postgresql-2026-01-14.log postgresql-2026-01-15.log
# Glob pattern
quellog /var/log/postgresql/*.log
# Today's log + previous days compressed
quellog postgresql-2026-01-15.log postgresql-2026-01-14.log.gz postgresql-2026-01-13.log.gz
# Stdin
kubectl logs postgres-pod | quellog -
All entries are merged and analyzed together regardless of source format.
Compression Formats¶
gzip (.gz)¶
Uses parallel decompression (pgzip) for faster processing.
zstd (.zst, .zstd)¶
Faster decompression and better compression ratios than gzip.
Archives (.tar, .tar.gz, .tgz, .tar.zst, .tar.zstd, .tzst)¶
Streams archive entries without full extraction. Handles nested compression (e.g., .tar containing .log.gz files).
ZIP Archives (.zip)¶
Extracts and processes all log entries from ZIP archives. Handles nested compressed files (.gz, .zst) within the archive.
7z Archives (.7z)¶
Extracts and processes log entries from 7z archives (LZMA/LZMA2 compression). Provides excellent compression ratios, especially for large log files.
Archive handling (tar, zip, 7z) is CLI-only. In the browser/WASM build, plain
.gz/.zstfiles are decompressed client-side in JavaScript, but archives are not extracted.