public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: Sehrope Sarkuni <[email protected]>
Cc: Pg Hackers <[email protected]>
Cc: [email protected]
Subject: Re: Add jsonlog log_destination for JSON server logs
Date: Fri, 10 Sep 2021 13:07:00 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAH7T-aqW0_yxuqznFkQbjdZz1ck+96Q2HzZHki6dsQbVHxzEPw@mail.gmail.com>
References: <CAH7T-aqswBM6JWe4pDehi1uOiufqe06DJWaU5=X7dDLyqUExHg@mail.gmail.com>
<[email protected]>
<CAH7T-aoDTnRo-U1Etw35bJiJZow7f2euC0Fh6nhSkSSxz333GA@mail.gmail.com>
<CAH7T-aqW0_yxuqznFkQbjdZz1ck+96Q2HzZHki6dsQbVHxzEPw@mail.gmail.com>
On Wed, Sep 01, 2021 at 04:39:43PM -0400, Sehrope Sarkuni wrote:
> This version splits out the existing csvlog code into its own file and
> centralizes the common helpers into a new elog-internal.h so that they're
> only included by the actual write_xyz sources.
>
> That makes the elog.c changes in the JSON logging patch minimal as all it's
> really doing is invoking the new write_jsonlog(...) function.
>
> It also adds those missing fields to the JSON logger output.
Forking a bit this thread while looking at 0002 that adds new tests
for csvlog. While I agree that it would be useful to have more
coverage with the syslogger message chunk protocol in this area, I
think that having a separate test is a waste of resources. Creating a
new node is not cheap either, and this adds more wait phases, making
the tests take longer. It would be much better to extend
004_logrotate.pl and update it to use log_destination = 'stderr,
csvlog', to minimize the number of nodes we create as well as the
additional amount of time we'd spend for those tests. Plugging in
JSON into that would not be complicated either once we have in place a
set of small routines that limit the code duplication between the
checks for each log destination type.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (833B, ../[email protected]/2-signature.asc)
download
view thread (27+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Add jsonlog log_destination for JSON server logs
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox