Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

core/debug.h

Go to the documentation of this file.
00001 
00014 #ifndef _CORE_DEBUG_H_
00015 #define _CORE_DEBUG_H_
00016 
00017 // XXX PUT THIS IN TOP LEVEL'S config.h
00018 #define DEBUG
00019 // XXX
00020 
00021 #ifdef DEBUG
00022 
00023 #include <assert.h>
00024 #include <sys/types.h>
00025 
00026 const char debug_agent_log_file[] = "/var/tmp/agent.log\0\0";
00027 const bool LOG_YES = true;
00028 const bool LOG_NO = false;
00029 
00030 #define debug_(NM, VL) debug_agent(NM, VL, LOG_NO)
00031 #define debug2_(NM, VL, LOG_FILE) debug_agent(NM, VL, LOG_FILE)
00032 
00033 template<class T>
00034 void debug_agent(char name[], T& value, bool logfile = false);
00035 
00036 #else
00037 
00038 #define debug_(NM, VL) //((void) 0)
00039 #define debug2_(NM, VL, LOG_FILE) //((void) 0)
00040 
00041 #endif // DEBUG
00042 
00043 #endif // _CORE_DEBUG_H_

Generated at Thu May 30 15:12:33 2002 for Freeagent by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001