00001 #ifndef _XRDOSS_TRACE_H
00002 #define _XRDOSS_TRACE_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "XrdOuc/XrdOucTrace.hh"
00016
00017
00018
00019 #define TRACE_ALL 0x0fff
00020 #define TRACE_Opendir 0x0001
00021 #define TRACE_Open 0x0002
00022 #define TRACE_AIO 0x0004
00023 #define TRACE_Debug 0x0800
00024
00025 #ifndef NODEBUG
00026
00027 #include "XrdSys/XrdSysHeaders.hh"
00028
00029 #define QTRACE(act) OssTrace.What & TRACE_ ## act
00030
00031 #define TRACE(act, x) \
00032 if (QTRACE(act)) \
00033 {OssTrace.Beg(epname,tident); cerr <<x; OssTrace.End();}
00034
00035 #define TRACEReturn(type, ecode, msg) \
00036 {TRACE(type, "err " <<ecode <<msg); return ecode;}
00037
00038 #define DEBUG(y) if (QTRACE(Debug)) \
00039 {OssTrace.Beg(epname); cerr <<y; OssTrace.End();}
00040
00041 #define EPNAME(x) static const char *epname = x;
00042
00043 #else
00044
00045 #define DEBUG(x)
00046 #define QTRACE(x) 0
00047 #define TRACE(x, y)
00048 #define TRACEReturn(type, ecode, msg) return ecode
00049 #define EPNAME(x)
00050
00051 #endif
00052 #endif