From bbe2b5f899a9c1bd7c99181f8702ec03c60f3028 Mon Sep 17 00:00:00 2001 From: bertho Date: Tue, 10 Feb 2009 13:39:25 +0000 Subject: - Rewrite part of the database backend setup and abstraction - Fix some printf's into debug statements --- server/src/saxparser.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'server/src/saxparser.cc') diff --git a/server/src/saxparser.cc b/server/src/saxparser.cc index fc1803e..f728928 100644 --- a/server/src/saxparser.cc +++ b/server/src/saxparser.cc @@ -25,6 +25,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #include "saxparser.h" +#include "debug.h" #include @@ -73,7 +74,7 @@ SAXParser::SAXParser() { p = XML_ParserCreate(NULL); if(!p) { - fprintf(stderr, "Couldn't allocate memory for parser\n"); + PRACRO_ERR_LOG(sax, "Couldn't allocate memory for parser\n"); // throw Exception(...); return; } @@ -114,7 +115,7 @@ int SAXParser::parse() bool SAXParser::parse(char *data, size_t size) { - printf("parse %d bytes\n", size); + PRACRO_DEBUG(sax, "parse %d bytes\n", size); bufferbytes = size; totalbytes += bufferbytes; @@ -133,7 +134,7 @@ bool SAXParser::parse(char *data, size_t size) } } - if(done) printf("Got END_OF_DOCUMENT [%s] at %ld\n", outertag.c_str(), XML_GetCurrentByteIndex(p)); + if(done) PRACRO_DEBUG(sax, "Got END_OF_DOCUMENT [%s] at %ld\n", outertag.c_str(), XML_GetCurrentByteIndex(p)); return done; } -- cgit v1.2.3