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

From David Arnold
Subject Re: Proposal: Adding json logging
Date
Msg-id CAH6vsWLTu6VXnZv+ASAvwLgkvvLzFY0XOmqR9CQ7iKuE2K9ngg@mail.gmail.com
Whole thread Raw
In response to Re: Proposal: Adding json logging  (Jordan Deitch <jd@rsa.pub>)
Responses Re: Proposal: Adding json logging  (Jordan Deitch <jd@rsa.pub>)
List pgsql-hackers
>A slightly larger lift would include escaping newlines and ensuring that JSON output is always single lines, however long.

I think that's necessary, actually I was implicitly assuming that as a prerequisite. I cannot imagine anything else beeing actually useful.

Alternatively, I'm sure logfmt has a well thought-through solution for that :-)

I would suggest that the community consider whether postgres will log multidimensional data. That will weigh into the decision of  json vs. another format quite significantly. I am a fan of the json5 spec (https://json5.org/), though adoption of this is quite poor. 

What do you mean by multidimensional data? Arrays/maps?

I think there is no advantage of multidimensional vs prefixed flat logging unless data structure gets really nastily nested.

What case where you thinking of?

El sáb., 14 abr. 2018, 6:25 p.m., Jordan Deitch <jd@rsa.pub> escribió:
I would suggest that the community consider whether postgres will log multidimensional data. That will weigh into the decision of  json vs. another format quite significantly. I am a fan of the json5 spec (https://json5.org/), though adoption of this is quite poor.


---
Jordan Deitch
https://id.rsa.pub

pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Online enabling of checksums
Next
From: Jordan Deitch
Date:
Subject: Re: Proposal: Adding json logging