Re: Frontend error logging style
Peter Eisentraut <peter.eisentraut@enterprisedb.com>
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-05-23T09:53:04Z
Lists: pgsql-hackers
Attachments
- 0001-logging-Also-add-the-command-prefix-to-detail-and-hi.patch (text/plain) patch 0001
On 29.03.22 16:24, Peter Eisentraut wrote: > I think I would want the program name/location also in front of the > detail and hint lines. I need to think about this a bit more. This > shouldn't hold up this patch; it would be a quick localized change. After experiencing this for a bit now, I propose to make this change. It lines up better and allows easier filtering of messages by program. Example: Before: initdb: error: locale "zh_HK.Big5HKSCS" requires unsupported encoding "BIG5" detail: Encoding "BIG5" is not allowed as a server-side encoding. hint: Rerun initdb with a different locale selection. After: initdb: error: locale "zh_HK.Big5HKSCS" requires unsupported encoding "BIG5" initdb: detail: Encoding "BIG5" is not allowed as a server-side encoding. initdb: hint: Rerun initdb with a different locale selection.
Commits
-
logging: Also add the command prefix to detail and hint messages
- a8cca6026e99 15.0 landed
-
Remove not-very-useful early checks of __pg_log_level in logging.h.
- 2c9381840fe2 15.0 landed
-
Improve frontend error logging style.
- 9a374b77fb53 15.0 landed
-
Apply PGDLLIMPORT markings broadly.
- 8ec569479fc2 15.0 cited