xrootd
|
00001 // $Id$ 00002 #ifndef ___SUT_TRACE_H___ 00003 #define ___SUT_TRACE_H___ 00004 /******************************************************************************/ 00005 /* */ 00006 /* X r d S u t T r a c e . h h */ 00007 /* */ 00008 /* (C) 2005 by the Board of Trustees of the Leland Stanford, Jr., University */ 00009 /* All Rights Reserved */ 00010 /* Produced by Andrew Hanushevsky for Stanford University under contract */ 00011 /* DE-AC03-76-SFO0515 with the Deprtment of Energy */ 00012 /******************************************************************************/ 00013 #ifndef ___OUC_TRACE_H___ 00014 #include "XrdOuc/XrdOucTrace.hh" 00015 #endif 00016 #ifndef ___SUT_AUX_H___ 00017 #include "XrdSut/XrdSutAux.hh" 00018 #endif 00019 00020 #ifndef NODEBUG 00021 00022 #include "XrdSys/XrdSysHeaders.hh" 00023 00024 #define QTRACE(act) (sutTrace && (sutTrace->What & sutTRACE_ ## act)) 00025 #define PRINT(y) {if (sutTrace) {sutTrace->Beg(epname); \ 00026 cerr <<y; sutTrace->End();}} 00027 #define TRACE(act,x) if (QTRACE(act)) PRINT(x) 00028 #define DEBUG(y) TRACE(Debug,y) 00029 #define EPNAME(x) static const char *epname = x; 00030 00031 #else 00032 00033 #define QTRACE(x) 00034 #define PRINT(x) 00035 #define TRACE(x,y) 00036 #define DEBUG(x) 00037 #define EPNAME(x) 00038 00039 #endif 00040 00041 // 00042 // For error logging and tracing 00043 extern XrdOucTrace *sutTrace; 00044 00045 #endif