00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef INTEGRA_DEBUG_H
00022 #define INTEGRA_DEBUG_H
00023
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027
00028 #ifdef HAVE_CONFIG_H
00029 #include "config.h"
00030 #endif
00031
00032 #include <stdio.h>
00033 #include <stdarg.h>
00034
00035 #ifndef INTEGRA_DEBUG
00036 #define INTEGRA_DEBUG 0
00037 #endif
00038
00039
00040 #define NTG_LOGGING 1
00041 #define NTG_LOGFILE "integra.log"
00042
00043
00044 #define DB_SERVER NTG_LOCATION, __FUNCTION__, 1
00045 #define DB_SERIALIZATION NTG_LOCATION, __FUNCTION__, 2
00046 #define DB_BRIDGE_HOST NTG_LOCATION, __FUNCTION__, 4
00047 #define DB_BRIDGE NTG_LOCATION, __FUNCTION__, 8
00048 #define DB_MEMORY NTG_LOCATION, __FUNCTION__, 16
00049 #define DB_VALIDATE NTG_LOCATION, __FUNCTION__, 32
00050 #define DB_HELPER NTG_LOCATION, __FUNCTION__, 64
00051 #define DB_NAMESPACE NTG_LOCATION, __FUNCTION__, 128
00052 #define DB_INSTANCE NTG_LOCATION, __FUNCTION__, 256
00053 #define DB_DEFINITION NTG_LOCATION, __FUNCTION__, 512
00054 #define DB_MODEL NTG_LOCATION, __FUNCTION__, 1024
00055 #define DB_PATH NTG_LOCATION, __FUNCTION__, 2048
00056
00057 #define DEBUG_CODE (1+2+4+8+32+64+128+256+512+2048)
00058
00059 #define STRINGIFY(x) #x
00060 #define TOSTRING(x) STRINGIFY(x)
00061 #define NTG_LOCATION __FILE__ ": " TOSTRING(__LINE__)
00062
00063 void DEBUG_POST(const char *location, const char *function, const int type, const char *fmt, ...);
00064
00065 #ifdef __cplusplus
00066 }
00067 #endif
00068
00069 #endif