pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Export log_line_prefix(); useful for emit_log_hook.
Date: Tue, 28 Jun 2022 22:32:31 -0700
Message-ID: <96bad2085dce2585fc747e20eba0aec4364cd371.camel@j-davis.com> (raw)
In-Reply-To: <YruoG3wYsI0Jq/kC@paquier.xyz>
References: <39c8197652f4d3050aedafae79fa5af31096505f.camel@j-davis.com>
	<YruoG3wYsI0Jq/kC@paquier.xyz>

On Wed, 2022-06-29 at 10:17 +0900, Michael Paquier wrote:
> On Tue, Jun 28, 2022 at 11:52:56AM -0700, Jeff Davis wrote:
> > Patch attached. Some kinds of emit log hooks might find it useful
> > to
> > also compute the log_line_prefix.
> 
> Have you played with anything specific that would require that?  I
> am fine to expose this routine, being mostly curious about what kind
> of recent format implemented with the elog hook would use it.

Just a slightly different format that is directly digestible by another
system, while still preserving what the original messages in the file
would look like.

There are other ways to do it, but it's convenient. If we use, e.g.,
csv or json format, we lose the log_line_prefix and would need to
regenerate it from the individual fields.

Regards,
	Jeff Davis







view thread (6+ messages)  latest in thread

Message-ID: <96bad2085dce2585fc747e20eba0aec4364cd371.camel@j-davis.com>
Permalink:  ../96bad2085dce2585fc747e20eba0aec4364cd371.camel@j-davis.com/
Also on:    postgresql.org/message-id/96bad2085dce2585fc747e20eba0aec4364cd371.camel@j-davis.com

 · 

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: pgsql-hackers@postgresql.org
  Cc: pgsql@j-davis.com, michael@paquier.xyz
  Subject: Re: Export log_line_prefix(); useful for emit_log_hook.
  In-Reply-To: <96bad2085dce2585fc747e20eba0aec4364cd371.camel@j-davis.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox