summaryrefslogtreecommitdiff
path: root/server/src/queryresult.h
diff options
context:
space:
mode:
authordeva <deva>2009-02-11 10:04:09 +0000
committerdeva <deva>2009-02-11 10:04:09 +0000
commit8a6d1f13b7680bc8f15ce57b8065a9bc774aa891 (patch)
treed07a45e761efb1422fad7c07def6fa77bc67b1a4 /server/src/queryresult.h
parent794100bb1d29d06b379b25899053f997013332e4 (diff)
Changed all printf debug outputs to new debug interface (PRACRO_DEBUG and friends).
Diffstat (limited to 'server/src/queryresult.h')
-rw-r--r--server/src/queryresult.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/server/src/queryresult.h b/server/src/queryresult.h
index 649f975..de95a49 100644
--- a/server/src/queryresult.h
+++ b/server/src/queryresult.h
@@ -31,6 +31,8 @@
#include <string>
#include <map>
+#include "debug.h"
+
class QueryResult {
public:
time_t timestamp;
@@ -39,18 +41,18 @@ public:
std::map< std::string, QueryResult > groups;
void print(std::string tabs = "") {
- printf("%sTimestamp: %d\n", tabs.c_str(), (int)timestamp);
- printf("%sSource: %s\n", tabs.c_str(), source.c_str());
- printf("%sValues:\n", tabs.c_str());
+ PRACRO_DEBUG(queryhandler,"%sTimestamp: %d\n", tabs.c_str(), (int)timestamp);
+ PRACRO_DEBUG(queryhandler,"%sSource: %s\n", tabs.c_str(), source.c_str());
+ PRACRO_DEBUG(queryhandler,"%sValues:\n", tabs.c_str());
for(std::map< std::string, std::string >::iterator i = values.begin(); i != values.end(); i++) {
- printf("%s[%s] => [%s]\n", tabs.c_str(), i->first.c_str(), i->second.c_str());
+ PRACRO_DEBUG(queryhandler,"%s[%s] => [%s]\n", tabs.c_str(), i->first.c_str(), i->second.c_str());
}
- printf("%s{\n", tabs.c_str());
+ PRACRO_DEBUG(queryhandler,"%s{\n", tabs.c_str());
for(std::map< std::string, QueryResult >::iterator i = groups.begin(); i != groups.end(); i++) {
- printf("%s[%s] =>:\n", tabs.c_str(), i->first.c_str());
+ PRACRO_DEBUG(queryhandler,"%s[%s] =>:\n", tabs.c_str(), i->first.c_str());
i->second.print(tabs +" ");
}
- printf("%s}\n", tabs.c_str());
+ PRACRO_DEBUG(queryhandler,"%s}\n", tabs.c_str());
}
};