Re: Unified logging system for command-line programs
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-01-03T13:28:51Z
Lists: pgsql-hackers
On 31/12/2018 16:55, Andres Freund wrote: > I think we should aim to unify the use (in contrast to the > implementation) of logging as much as possible, rather than having a > separate API for it for client programs. I opted against doing that, for mainly two reasons: One, I think the ereport() API is too verbose for this purpose, an invocation is usually two to three lines. My goal was to make logging smaller and more compact. Two, I think tying error reporting to flow control does not always work well and leads to bad code and a bad user experience. Relatedly, rewriting all the frontend programs to exception style would end up being a 10x project to rewrite everything for no particular benefit. Going from 8 or so APIs to 2 is already an improvement, I think. If someone wants to try going further, it can be considered, but it would be an entirely different project. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Unified logging system for command-line programs
- cc8d41511721 12.0 landed
-
Assorted translatable string fixes
- 55a70a023c3d 10.0 cited