libpq++ Makefile uses -DDEBUG to turn on debugging trace to
authorBruce Momjian
Thu, 16 Mar 2000 15:34:36 +0000 (15:34 +0000)
committerBruce Momjian
Thu, 16 Mar 2000 15:34:36 +0000 (15:34 +0000)
/tmp/trace.out.
However, elog.h uses DEBUG as a log-level flag.  As a result, tracing is
turned on even if the libpq++.so is built with DEBUG commented out in
the Makefile.

This patch changes libpq++ to use DEBUGFILE instead (which is not
defined anywhere else).

Oliver Elphick

src/interfaces/libpq++/Makefile.in
src/interfaces/libpq++/pgconnection.cc

index d85125431205bd2fe4fe85bc493509956eddad70..8b579104d4e58c56c384a2d2d705ff4def7c9abb 100644 (file)
@@ -6,7 +6,7 @@
 # Copyright (c) 1994, Regents of the University of California
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile.in,v 1.21 2000/03/08 01:58:37 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile.in,v 1.22 2000/03/16 15:34:36 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -34,7 +34,7 @@ CXXFLAGS+=   -I$(SRCDIR)/backend \
              -I$(SRCHEADERDIR) \
              -I$(LIBPQDIR)
 
-#CXXFLAGS+= -DDEBUG
+#CXXFLAGS+= -DDEBUGFILE
 
 ifdef KRBVERS
 CXXFLAGS+= $(KRBFLAGS)
index 3ba7f893bd1f6877c0e605666580e1b0b97d2ef3..3afbb57aa60ddbdf47dc9346e84575f6ac2a0f2f 100644 (file)
@@ -10,7 +10,7 @@
  * Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgconnection.cc,v 1.6 1999/05/30 15:17:56 tgl Exp $
+ *   $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgconnection.cc,v 1.7 2000/03/16 15:34:36 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -49,7 +49,7 @@ PgConnection::PgConnection(const char* conninfo)
 PgConnection::~PgConnection()
 {
   // Terminate the debugging output if it was turned on
-  #if defined(DEBUG)
+  #if defined(DEBUGFILE)
    PQuntrace(pgConn);
   #endif
   
@@ -68,7 +68,7 @@ ConnStatusType PgConnection::Connect(const char* conninfo)
 {
 ConnStatusType cst;
   // Turn the trace on
-#if defined(DEBUG)
+#if defined(DEBUGFILE)
   FILE *debug = fopen("/tmp/trace.out","w");
   PQtrace(pgConn, debug);
 #endif