Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


updates for user space utilities
[palacios.git] / misc / network_servers / vtl / debug.h
index 20cb547..91d4744 100644 (file)
@@ -1,61 +1,12 @@
 #ifndef __DEBUG_H
-#define __DEBUG_H 1
+#define __DEBUG_H
 
+#include <string>
 
+using namespace std;
 
-
-#ifdef DEBUG
-
-#define ASSERT(exp) assert(exp)
-
-/*
- *
- *
- */
-
-#ifdef linux
-
-extern FILE * logfile;
-extern time_t dbgt;
-extern char dmsg[1024];
-
-#define DEBUG_DECLARE() FILE * logfile; time_t dbgt; char dmsg[1024];
-#define JRLDBG( ...) time(&dbgt); sprintf(dmsg,"%s: ",ctime(&dbgt)); *(dmsg + strlen(dmsg) -3) = ' '; fprintf(logfile, dmsg); sprintf(dmsg,__VA_ARGS__); fprintf(logfile,dmsg); fflush(logfile);
-#define debug_init(logfilename) logfile = fopen(logfilename,"w+")
-
-#elif defined(WIN32)
-
-#define DEBUG_DECLARE() 
-#define JRLDBG printf
-#define debug_init(logfilename) 
-
-#endif
-
-/*
- *
- *
- */
-
-#else //!DEBUG
-
-#ifdef WIN32
-
-#define ASSERT(exp)
-#define DEBUG_DECLARE()
-#define JRLDBG()
-#define debug_init(logfilename)
-
-#elif defined(linux)
-
-#define ASSERT(exp)
-#define DEBUG_DECLARE(...)
-#define JRLDBG(...)
-#define debug_init(logfilename)
-
-#endif
-
-#endif
-
+int vtl_debug_init(string logfilename, int debug_enable);
+void vtl_debug(const char * fmt, ...);
 
 
 #endif