summaryrefslogtreecommitdiff
path: root/server/src/saxparser.cc
diff options
context:
space:
mode:
authorbertho <bertho>2009-02-10 13:39:25 +0000
committerbertho <bertho>2009-02-10 13:39:25 +0000
commitbbe2b5f899a9c1bd7c99181f8702ec03c60f3028 (patch)
tree6da04c039a0e04930bb1c7e4fea5b14e52f9bc57 /server/src/saxparser.cc
parent3f1b036458bf9b348b65c36fa30ecb177800d703 (diff)
- Rewrite part of the database backend setup and abstraction
- Fix some printf's into debug statements
Diffstat (limited to 'server/src/saxparser.cc')
-rw-r--r--server/src/saxparser.cc7
1 files changed, 4 insertions, 3 deletions
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 <string.h>
@@ -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;
}