Re: Proposal: Adding json logging

Поиск
Список
Период
Сортировка
От David Arnold
Тема Re: Proposal: Adding json logging
Дата
Msg-id CAH6vsWLhmODjv40U65EE7vx44HR4PEomNbn=qSrYvyxN78ZD3A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Proposal: Adding json logging  (David Arnold <dar@xoe.solutions>)
Список pgsql-hackers
>As to logfmt in particular, the fact that it's not standardized is probably a show-stopper.
>Let's go with JSON.

I Agree. Though I don't want to deprecate the idea of logfmt enterly, yet. In container infrastructure it's a defacto standard and it solves a real problem. But I'm in favor to step back with that idea in favour of prioritizing JSON.

El sáb., 14 abr. 2018, 11:03 a.m., David Arnold <dar@xoe.solutions> escribió:
>I'm dubious that JSON is "easier on machines" than CSV.

Under common paradigms you are right, but if we talk of line-by-line streaming with subsequent processing, then it's a show stopper. Of course, some log aggregators have buffers for that and can do Multiline parsing on that buffer, but 
1. Not all log aggregators support it
2. Building a parser which reliably detects Multiline logs AND is easy on resources is probably not something a normal person can achieve quickly.

So normally CSV is fine but for log streaming it's not the best, nor the most standard compliant way.

El sáb., 14 abr. 2018, 10:51 a.m., Tom Lane <tgl@sss.pgh.pa.us> escribió:
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.

                        regards, tom lane

В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: Proposal: Adding json logging
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: MinIndexTupleSize seems slightly wrong