00001 #ifndef _XRDCMS_TRACE_H
00002 #define _XRDCMS_TRACE_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "XrdSys/XrdSysError.hh"
00016 #include "XrdOuc/XrdOucTrace.hh"
00017
00018 #define TRACE_ALL 0xffff
00019 #define TRACE_Debug 0x0001
00020 #define TRACE_Stage 0x0002
00021 #define TRACE_Defer 0x0004
00022 #define TRACE_Forward 0x0008
00023 #define TRACE_Redirect 0x0010
00024 #define TRACE_Files 0x0020
00025
00026 #ifndef NODEBUG
00027
00028 #include "XrdSys/XrdSysHeaders.hh"
00029
00030 #define QTRACE(act) Trace.What & TRACE_ ## act
00031
00032 #define DEBUGR(y) if (Trace.What & TRACE_Debug) \
00033 {Trace.Beg(epname, Arg.Ident); cerr <<y; Trace.End();}
00034
00035 #define DEBUG(y) if (Trace.What & TRACE_Debug) TRACEX(y)
00036
00037 #define TRACE(x,y) if (Trace.What & TRACE_ ## x) TRACEX(y)
00038
00039 #define TRACER(x,y) if (Trace.What & TRACE_ ## x) \
00040 {Trace.Beg(epname, Arg.Ident); cerr <<y; Trace.End();}
00041
00042 #define TRACEX(y) {Trace.Beg(0,epname); cerr <<y; Trace.End();}
00043
00044 #define EPNAME(x) static const char *epname = x;
00045
00046 #else
00047
00048 #define DEBUG(y)
00049 #define TRACE(x, y)
00050 #define EPNAME(x)
00051
00052 #endif
00053
00054 namespace XrdCms
00055 {
00056 extern XrdOucTrace Trace;
00057 extern XrdSysError Say;
00058 }
00059 #endif