| От | Michael Paquier |
|---|---|
| Тема | Re: convert elog(LOG) calls to ereport |
| Дата | |
| Msg-id | X8ru1EIuo7LD1vU6@paquier.xyz обсуждение исходный текст |
| Ответ на | Re: convert elog(LOG) calls to ereport (Peter Eisentraut <peter.eisentraut@enterprisedb.com>) |
| Ответы |
Re: convert elog(LOG) calls to ereport
|
| Список | pgsql-hackers |
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.
--
Michael
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера