Re: Add jsonlog log_destination for JSON server logs
Greg Stark <stark@mit.edu>
From: Greg Stark <stark@mit.edu>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Michael Paquier <michael@paquier.xyz>,
Sehrope Sarkuni <sehrope@jackdb.com>, Pg Hackers <pgsql-hackers@postgresql.org>, David Fetter <david@fetter.org>
Date: 2021-09-09T02:58:51Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Introduce log_destination=jsonlog
- dc686681e079 15.0 landed
-
Refactor set of routines specific to elog.c
- ac7c80758a7a 15.0 landed
-
Fix compilation warning in syslogger.c
- 05c4248ad1bf 15.0 landed
-
Refactor per-destination file rotation in logging collector
- 5c6e33f07153 15.0 landed
-
Refactor output file handling when forking syslogger under EXEC_BACKEND
- 5b0b699f748e 15.0 landed
-
Add regression tests for csvlog with the logging collector
- 72b76f76161c 15.0 landed
-
Refactor the syslogger pipe protocol to use a bitmask for its options
- 2d77d835403a 15.0 landed
Fwiw I was shocked when I saw the t/f T/F kluge when I went to work on jsonlogging. That's the kind of dead-end short-sighted hack that just lays traps and barriers for future hackers to have to clean up before they can do the work they want to do. Please just put a "format" field (or "channel" field -- the logging daemon doesn't really care what format) with a list of defined formats that can easily be extended in the future. If you want to steal the high bit for "is last" and only allow 128 values instead of 256 so be it.