Go to the documentation of this file. 1 #ifndef _XRDFILECACHE_TRACE_H 2 #define _XRDFILECACHE_TRACE_H 8 #define TRACE_Warning 2 13 #define TRACE_STR_None "" 14 #define TRACE_STR_Error "error " 15 #define TRACE_STR_Warning "warning " 16 #define TRACE_STR_Info "info " 17 #define TRACE_STR_Debug "debug " 18 #define TRACE_STR_Dump "dump " 20 #define TRACE_STR_0 "" 21 #define TRACE_STR_1 "error " 22 #define TRACE_STR_2 "warning " 23 #define TRACE_STR_3 "info " 24 #define TRACE_STR_4 "debug " 25 #define TRACE_STR_5 "dump " 33 #define XRD_TRACE GetTrace()-> 36 #define ERRNO_AND_ERRSTR(err_code) ", err_code=" << err_code << ", err_str=" << strerror(err_code) 38 #define TRACE(act, x) \ 39 if (XRD_TRACE What >= TRACE_ ## act) \ 40 SYSTRACE(XRD_TRACE, 0, m_traceID, 0, TRACE_STR_ ## act << x) 42 #define TRACE_INT(act, x) \ 43 if (XRD_TRACE What >= act) \ 44 {static const char* t_what[]={"","error ","warning ","info ","debug ","dump "};\ 45 SYSTRACE(XRD_TRACE, 0, m_traceID, 0, t_what[act] <<x)} 47 #define TRACE_TEST(act, x) \ 48 SYSTRACE(XRD_TRACE, 0, m_traceID, 0, TRACE_STR_ ## act <<x) 50 #define TRACE_PC(act, pre_code, x) \ 51 if (XRD_TRACE What >= TRACE_ ## act) \ 52 {pre_code; SYSTRACE(XRD_TRACE, 0, m_traceID, 0, TRACE_STR_ ## act <<x)} 54 #define TRACEIO(act, x) \ 55 if (XRD_TRACE What >= TRACE_ ## act) SYSTRACE(XRD_TRACE, 0, m_traceID, 0, \ 56 TRACE_STR_ ## act <<x <<" " <<GetPath()) 58 #define TRACEF(act, x) \ 59 if (XRD_TRACE What >= TRACE_ ## act) SYSTRACE(XRD_TRACE, 0, m_traceID, 0, \ 60 TRACE_STR_ ## act <<x <<" " <<GetLocalPath()) 64 #define ERRNO_AND_ERRSTR(err_code) 66 #define TRACE_PC(act, pre_code, x) 67 #define TRACEIO(act, x) 68 #define TRACEF(act, x)