debug.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #ifndef DEBUG_H
00009 #define DEBUG_H
00010
00035 #include "int_sizes.h"
00036
00037 #include <unistd.h>
00038
00039 #include <sys/types.h>
00040
00041 #include <stdarg.h>
00042 #include <stdio.h>
00043
00044
00045 #define D_INFO (0LL)
00046 #define D_FATAL (1LL<<0)
00047 #define D_ERROR (1LL<<1)
00048 #define D_NOTICE (1LL<<2)
00049 #define D_DEBUG (1LL<<3)
00051
00052 #define D_SYSCALL (1LL<<4)
00053 #define D_CHANNEL (1LL<<5)
00054 #define D_PROCESS (1LL<<6)
00055 #define D_RESOLVE (1LL<<7)
00056 #define D_LIBCALL (1LL<<8)
00057 #define D_LOCAL (1LL<<9)
00058 #define D_DNS (1LL<<10)
00059 #define D_TCP (1LL<<11)
00060 #define D_AUTH (1LL<<12)
00061 #define D_IRODS (1LL<<13)
00062 #define D_CVMFS (1LL<<14)
00063 #define D_HTTP (1LL<<15)
00064 #define D_FTP (1LL<<16)
00065 #define D_NEST (1LL<<17)
00066 #define D_GROW (1LL<<18)
00067 #define D_CHIRP (1LL<<19)
00068 #define D_DCAP (1LL<<20)
00069 #define D_RFIO (1LL<<21)
00070 #define D_GLITE (1LL<<22)
00071 #define D_MULTI (1LL<<23)
00072 #define D_PSTREE (1LL<<24)
00073 #define D_ALLOC (1LL<<25)
00074 #define D_LFC (1LL<<26)
00075 #define D_GFAL (1LL<<27)
00076 #define D_SUMMARY (1LL<<28)
00077 #define D_LOGIN (1LL<<29)
00078 #define D_CACHE (1LL<<30)
00079 #define D_POLL (1LL<<31)
00080 #define D_HDFS (1LL<<32)
00081 #define D_WQ (1LL<<33)
00082 #define D_BXGRID (1LL<<34)
00083 #define D_USER (1LL<<35)
00084 #define D_XROOTD (1LL<<36)
00085 #define D_MPI (1LL<<37)
00086 #define D_BATCH (1LL<<38)
00087 #define D_RMON (1LL<<39)
00088 #define D_MAKEFLOW_RUN (1LL<<40)
00089 #define D_MAKEFLOW_LEXER (1LL<<41)
00090 #define D_MAKEFLOW_PARSER (1LL<<42)
00091 #define D_CONFUGA (1LL<<43)
00094 #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|D_HDFS|D_BXGRID|D_XROOTD|D_CVMFS)
00095
00097 #define D_MAKEFLOW (D_MAKEFLOW_RUN|D_MAKEFLOW_LEXER|D_MAKEFLOW_PARSER)
00098
00100 #define D_ALL (~(0LL))
00101
00102
00103
00104
00105
00106
00107
00108
00109 #define debug cctools_debug
00110 #define fatal cctools_fatal
00111 #define notice cctools_notice
00112 #define warn cctools_warn
00113 #define debug_config cctools_debug_config
00114 #define debug_config_file cctools_debug_config_file
00115 #define debug_config_file_size cctools_debug_config_file_size
00116 #define debug_config_fatal cctools_debug_config_fatal
00117 #define debug_config_getpid cctools_debug_config_getpid
00118 #define debug_flags_set cctools_debug_flags_set
00119 #define debug_flags_print cctools_debug_flags_print
00120 #define debug_flags_clear cctools_debug_flags_clear
00121 #define debug_flags_restore cctools_debug_flags_restore
00122 #define debug_set_flag_name cctools_debug_set_flag_name
00123 #define debug_rename cctools_debug_rename
00124
00131 void debug(INT64_T flags, const char *fmt, ...)
00132 #ifndef SWIG
00133 __attribute__ (( format(printf,2,3) ))
00134 #endif
00135 ;
00136
00144 void vdebug(INT64_T flags, const char *fmt, va_list args);
00145
00152 void warn(INT64_T flags, const char *fmt, ...);
00153
00159 void fatal(const char *fmt, ...);
00160
00161
00167 void notice(INT64_T flags, const char *fmt, ...);
00168
00174 void debug_config(const char *name);
00175
00182 void debug_config_file(const char *file);
00183
00184 int debug_config_file_e(const char *file);
00185
00193 void debug_config_file_size(off_t size);
00194
00195 void debug_config_fatal(void (*callback) (void));
00196
00197 void debug_config_getpid (pid_t (*getpidf)(void));
00198
00207 int debug_flags_set(const char *flagname);
00208
00215 void debug_flags_print(FILE * stream);
00216
00222 INT64_T debug_flags_clear(void);
00223
00230 void debug_set_flag_name(INT64_T flag, const char *name);
00231
00235 void debug_flags_restore(INT64_T flags);
00236
00240 void debug_rename(const char *suffix);
00241
00244 void debug_reopen(void);
00245
00246 #endif