Re: Proposal: Adding json logging - Mailing list pgsql-hackers

From David Fetter
Subject Re: Proposal: Adding json logging
Date
Msg-id 20180414160518.GJ25709@fetter.org
Whole thread Raw
In response to Re: Proposal: Adding json logging  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Proposal: Adding json logging
List pgsql-hackers
On Sat, Apr 14, 2018 at 11:51:17AM -0400, Tom Lane wrote:
> David Fetter <david@fetter.org> writes:
> > I think a suite of json_to_* utilities would be a good bit more
> > helpful in this regard than changing our human-eye-consumable
> > logs. We already have human-eye-consumable logs by default.  What
> > we don't have, and increasingly do want, is a log format that's
> > really easy on machines.
> 
> I'm dubious that JSON is "easier on machines" than CSV.

I've found the opposite.

CSV is very poorly specified, which makes it at best complicated to
build correct parsing libraries. JSON, whatever gripes I have about
the format[1] is extremely well specified, and hence has excellent
parsing libraries.

Best,
David.

[1] These are mostly the lack of comments and of some useful data
types like large integers, floats, and ISO-8601 dates.  PostgreSQL
continues to share that last.
-- 
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


pgsql-hackers by date:

Previous
From: David Arnold
Date:
Subject: Re: Proposal: Adding json logging
Next
From: David Arnold
Date:
Subject: Re: Proposal: Adding json logging