00001
00002
00003
00004
00005
00006
00007
00008 #ifndef DEBUG_H
00009 #define DEBUG_H
00010
00035 #include <stdio.h>
00036 #include <unistd.h>
00037 #include <sys/types.h>
00038
00039 #define D_SYSCALL 0x00000001
00040 #define D_CHANNEL 0x00000002
00041 #define D_PROCESS 0x00000004
00042 #define D_NOTICE 0x00000008
00043 #define D_RESOLVE 0x00000010
00044 #define D_LIBCALL 0x00000020
00045 #define D_LOCAL 0x00000040
00046 #define D_DNS 0x00000080
00047 #define D_TCP 0x00000100
00048 #define D_AUTH 0x00000200
00049 #define D_IRODS 0x00000400
00050 #define D_CLOUD 0x00000800
00051 #define D_HTTP 0x00001000
00052 #define D_FTP 0x00002000
00053 #define D_NEST 0x00004000
00054 #define D_GROW 0x00008000
00055 #define D_CHIRP 0x00010000
00056 #define D_DCAP 0x00020000
00057 #define D_RFIO 0x00040000
00058 #define D_GLITE 0x00080000
00059 #define D_MULTI 0x00100000
00060 #define D_PSTREE 0x00200000
00061 #define D_ALLOC 0x00400000
00062 #define D_LFC 0x00800000
00063 #define D_GFAL 0x01000000
00064 #define D_SUMMARY 0x02000000
00065 #define D_DEBUG 0x04000000
00066 #define D_LOGIN 0x08000000
00067 #define D_CACHE 0x10000000
00068 #define D_POLL 0x20000000
00069 #define D_GETENV 0x40000000
00072 #define D_REMOTE (D_HTTP|D_FTP|D_NEST|D_CHIRP|D_DCAP|D_RFIO|D_LFC|D_GFAL|D_MULTI|D_GROW|D_IRODS)
00073
00075 #define D_ALL 0xffffffff
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085 #define debug cctools_debug
00086 #define fatal cctools_fatal
00087 #define debug_config cctools_debug_config
00088 #define debug_config_file cctools_debug_config_file
00089 #define debug_config_file_size cctools_debug_config_file_size
00090 #define debug_config_fatal cctools_debug_config_fatal
00091 #define debug_config_getpid cctools_debug_config_getpid
00092 #define debug_flags_set cctools_debug_flags_set
00093 #define debug_flags_print cctools_debug_flags_print
00094 #define debug_flags_clear cctools_debug_flags_clear
00095 #define debug_flags_restore cctools_debug_flags_restore
00096
00103 void debug( int flags, char *fmt, ... );
00104
00110 void fatal( char *fmt, ... );
00111
00117 void debug_config( char *name );
00118
00125 void debug_config_file( const char *file );
00126
00134 void debug_config_file_size( int size );
00135
00136 void debug_config_fatal( void (*callback) () );
00137 void debug_config_getpid( pid_t (*getpidfunc)() );
00138
00147 int debug_flags_set( const char *flagname );
00148
00155 void debug_flags_print( FILE *stream );
00156
00162 int debug_flags_clear();
00163
00164 #endif
00165