xrootd
|
00001 #ifndef _XRDOSS_TRACE_H 00002 #define _XRDOSS_TRACE_H 00003 /******************************************************************************/ 00004 /* */ 00005 /* X r d O s s T r a c e . h h */ 00006 /* */ 00007 /* (C) 2003 by the Board of Trustees of the Leland Stanford, Jr., University */ 00008 /* All Rights Reserved */ 00009 /* Produced by Andrew Hanushevsky for Stanford University under contract */ 00010 /* DE-AC03-76-SFO0515 with the Deprtment of Energy */ 00011 /******************************************************************************/ 00012 00013 // $Id$ 00014 00015 #include "XrdOuc/XrdOucTrace.hh" 00016 00017 // Trace flags 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