Re: pgbench - use pg logging capabilities

Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Fabien COELHO <coelho@cri.ensmp.fr>, Michael Paquier <michael@paquier.xyz>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2019-12-31T11:10:13Z
Lists: pgsql-hackers
On 2019-12-24 11:17, Fabien COELHO wrote:
> As suggested in "cce64a51", this patch make pgbench use postgres logging
> capabilities.
> 
> I tried to use fatal/error/warning/info/debug where appropriate.
> 
> Some printing to stderr remain for some pgbench specific output.

The patch seems pretty straightforward, but this

+/*
+ * Convenient shorcuts
+ */
+#define fatal pg_log_fatal
+#define error pg_log_error
+#define warning pg_log_warning
+#define info pg_log_info
+#define debug pg_log_debug

seems counterproductive.  Let's just use the normal function names.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Commits

  1. pgbench: Make more debug messages use common logging API

  2. pgbench: Use common logging API