Go to the documentation of this file.00001 #ifndef _XRDOLB_TRACE_H
00002 #define _XRDOLB_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 0x0007
00019 #define TRACE_Debug 0x0001
00020 #define TRACE_Stage 0x0002
00021 #define TRACE_Defer 0x0004
00022
00023 #ifndef NODEBUG
00024
00025 #ifndef XRDOLBTRACETYPE
00026 #define XRDOLBTRACETYPE .
00027 #endif
00028
00029 #include "XrdSys/XrdSysHeaders.hh"
00030 #include "XrdOuc/XrdOucTrace.hh"
00031
00032 #define DEBUG(y) if (Trace XRDOLBTRACETYPE What & TRACE_Debug) TRACEX(y)
00033
00034 #define TRACE(x,y) if (Trace XRDOLBTRACETYPE What & TRACE_ ## x) TRACEX(y)
00035
00036 #define TRACEX(y) {Trace XRDOLBTRACETYPE Beg(0,epname); cerr <<y; Trace XRDOLBTRACETYPE End();}
00037
00038 #define EPNAME(x) 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 namespace XrdOlb
00049 {
00050 extern XrdSysError Say;
00051 extern XrdOucTrace Trace;
00052 }
00053 #endif