PostgreSQL logs can now be output in JSON using the jsonlog parameter when setting log_destination. This provides a "structured log" that can be used by other utilities for storage and analysis.
jsonlog
log_destination