Re: logfmt and application_context

From: Étienne BERSAC <etienne(dot)bersac(at)dalibo(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: logfmt and application_context
Date: 2023-09-26 07:56:27
Message-ID: d08cf648d2c983f54d572989bccbad00c4bf3712.camel@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Daniel,

Thanks for the feedback.

Le mardi 05 septembre 2023 à 11:35 +0200, Daniel Gustafsson a écrit :
> > On 30 Aug 2023, at 14:36, Étienne BERSAC <etienne(dot)bersac(at)dalibo(dot)com> wrote:
>
> > ..what do you think of having logfmt output along json and CSV ?
>
> Less ideal is
> that there is no official formal definition of what logfmt is [...]  If we add
> support for it, can we reasonably expect that what we emit is what consumers of
> it assume it will look like?

I didn't know logfmt had variation. Do you have a case of
incompatibility ?

Anyway, I think that logfmt will be better handled inside Postgres
rather than in an extension due to limitation in syslogger
extendability. I could send a patch if more people are interested in
this.

What do you think about application_context as a way to render e.g. a
web request UUID to all backend log messages ?

Regards,
Étienne

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Laurenz Albe 2023-09-26 08:11:25 Re: Regression in COPY FROM caused by 9f8377f7a2
Previous Message Michael Paquier 2023-09-26 07:38:28 Fail hard if xlogreader.c fails on out-of-memory