Re: Frontend error logging style
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-11-16T03:02:08Z
Lists: pgsql-hackers
On Mon, Nov 15, 2021 at 02:40:10PM -0500, Robert Haas wrote: > Having different frontend utilities each invent their own > slightly-different way of doing this makes it hard to reuse code, and > hard to understand code. We need to find ways to make it more uniform, > not just observe that it isn't uniform today and give up. I agree with this sentiment, but this is a bit more complex than just calling exit() with pg_log_fatal(), no? pg_dump likes playing a lot with its exit_nicely(), meaning that we may want to allow frontends to plug in callbacks. -- Michael
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