From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: convert elog(LOG) calls to ereport
Date: Fri, 23 Apr 2021 14:42:06 +0200
Message-ID: <c1a3656b-a596-05ec-2353-3dfc3657eae9@enterprisedb.com> (raw)
In-Reply-To: <X8ru1EIuo7LD1vU6@paquier.xyz>
References: <20201202140445.GA26406@alvherre.pgsql>
<41f5c5f7-3611-9bdc-cfad-9f61146419ff@enterprisedb.com>
<X8ru1EIuo7LD1vU6@paquier.xyz>
On 05.12.20 03:22, Michael Paquier wrote:
> On Fri, Dec 04, 2020 at 02:34:26PM +0100, Peter Eisentraut wrote:
>> On 2020-12-02 15:04, Alvaro Herrera wrote:
>>> I do wonder if it'd be a good idea to move the syscall
>>> name itself out of the message, too; that would reduce the number of
>>> messages to translate 50x to just "%s(%s) failed: %m" instead of one
>>> message per distinct syscall.
>>
>> Seems useful, but perhaps as a separate project.
>
> - elog(LOG, "getsockname() failed: %m");
> + ereport(LOG,
> + (errmsg("getsockname() failed: %m")));
> FWIW, I disagree with the approach taken by eb93f3a. As of HEAD, it
> is now required to translate all those strings. I think that it would
> have been better to remove the function names from all those error
> messages and not require the same pattern to be translated N times.
I made another pass across this and implemented the requested change.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: peter.eisentraut@enterprisedb.com, michael@paquier.xyz, alvherre@alvh.no-ip.org
Subject: Re: convert elog(LOG) calls to ereport
In-Reply-To: <c1a3656b-a596-05ec-2353-3dfc3657eae9@enterprisedb.com>
References: <20201202140445.GA26406@alvherre.pgsql> <41f5c5f7-3611-9bdc-cfad-9f61146419ff@enterprisedb.com> <X8ru1EIuo7LD1vU6@paquier.xyz> <c1a3656b-a596-05ec-2353-3dfc3657eae9@enterprisedb.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