From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Unified logging system for command-line programs
Date: Sun, 30 Dec 2018 14:45:23 -0500
Message-ID: <21141.1546199123@sss.pgh.pa.us> (raw)
In-Reply-To: <6a609b43-4f57-7348-6480-bd022f924310@2ndquadrant.com>
References: <6a609b43-4f57-7348-6480-bd022f924310@2ndquadrant.com>
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> I have developed a patch that unifies the various ad hoc logging
> (message printing, error printing) systems used throughout the
> command-line programs.
I've not read the patch in any detail, but +1 for making this more
uniform.
> - Common files (common/, fe_utils/, etc.) can handle logging much more
> simply by just using one API without worrying too much about the context
> of the calling program, requiring callbacks, or having to pass
> "progname" around everywhere.
It seems like a shame that src/common files still need to have
#ifdef FRONTEND variant code to deal with frontend vs. backend
conventions. I wonder how hard it would be to layer some subset of
ereport() functionality on top of what you have here, so as to get
rid of those #ifdef stanzas.
regards, tom lane
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: tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com
Subject: Re: Unified logging system for command-line programs
In-Reply-To: <21141.1546199123@sss.pgh.pa.us>
* 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