Orb/Doxygen/addon/doxmlparser/src/debug.cpp
changeset 0 42188c7ea2d9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Orb/Doxygen/addon/doxmlparser/src/debug.cpp	Thu Jan 21 17:29:01 2010 +0000
@@ -0,0 +1,24 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+
+#include "debug.h"
+
+static int s_debugLevel = 0;
+
+void debug(int level,const char *msg,...)
+{
+  if (level<=s_debugLevel)
+  {
+    va_list args;
+    va_start(args, msg);
+    vfprintf(stderr, msg, args);
+    va_end(args); 
+  }
+}
+
+void setDebugLevel(int level)
+{
+  s_debugLevel = level;
+}
+