Re: Add jsonlog log_destination for JSON server logs
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Andres Freund <andres@anarazel.de>
Cc: Sehrope Sarkuni <sehrope@jackdb.com>, Pg Hackers <pgsql-hackers@postgresql.org>, david@fetter.org
Date: 2022-01-05T07:32:46Z
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
Attachments
- v8-0001-Some-refactoring-of-elog-specific-routines.patch (text/x-diff) patch v8-0001
- v8-0002-Refactor-CSV-specific-code-into-its-own-file.patch (text/x-diff) patch v8-0002
- v8-0003-JSON-logging.patch (text/x-diff) patch v8-0003
On Sun, Jan 02, 2022 at 01:34:45PM -0800, Andres Freund wrote: > The tests don't seem to pass on windows: > https://cirrus-ci.com/task/5412456754315264?logs=test_bin#L47 > https://api.cirrus-ci.com/v1/artifact/task/5412456754315264/tap/src/bin/pg_ctl/tmp_check/log/regress_log_004_logrotate > > psql:<stdin>:1: ERROR: division by zero > could not open "c:/cirrus/src/bin/pg_ctl/tmp_check/t_004_logrotate_primary_data/pgdata/current_logfiles": The system cannot find the file specified at t/004_logrotate.pl line 87. This seems to point out that the syslogger is too slow to capture the logrotate signal, and the patch set is introducing nothing new in terms of infrastructure, just an extra value for log_destination. This stuff passes here, and I am not spotting something amiss after an extra close read. Attached is an updated patch set that increases the test timeout (5min -> 10min). That should help, I assume. -- Michael