00001 #ifndef _XRDFRM_TRACE_H
00002 #define _XRDFRM_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
00021 #ifndef NODEBUG
00022
00023 #include "XrdSys/XrdSysHeaders.hh"
00024
00025 #define QTRACE(act) Trace.What & TRACE_ ## act
00026
00027 #define DEBUGR(y) if (Trace.What & TRACE_Debug) \
00028 {Trace.Beg(epname, Req.User); cerr <<y; Trace.End();}
00029
00030 #define DEBUG(y) if (Trace.What & TRACE_Debug) TRACEX(y)
00031
00032 #define TRACE(x,y) if (Trace.What & TRACE_ ## x) TRACEX(y)
00033
00034 #define TRACER(x,y) if (Trace.What & TRACE_ ## x) \
00035 {Trace.Beg(epname, Req.User); cerr <<y; Trace.End();}
00036
00037 #define TRACEX(y) {Trace.Beg(0,epname); cerr <<y; Trace.End();}
00038 #define EPNAME(x) static const char *epname = x;
00039
00040 #else
00041
00042 #define DEBUG(y)
00043 #define TRACE(x, y)
00044 #define EPNAME(x)
00045
00046 #endif
00047
00048 #define VMSG(a,...) if (Config.Verbose) Say.Emsg(a,__VA_ARGS__);
00049
00050 #define VSAY(a,...) if (Config.Verbose) Say.Say(a,__VA_ARGS__);
00051
00052 namespace XrdFrm
00053 {
00054 extern XrdSysError Say;
00055 extern XrdOucTrace Trace;
00056 }
00057 #endif