xrootd
|
00001 #ifndef _XRDFRM_TRACE_H 00002 #define _XRDFRM_TRACE_H 00003 /******************************************************************************/ 00004 /* */ 00005 /* X r d F r m T r a c e . h h */ 00006 /* */ 00007 /* (c) 2009 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-AC02-76-SFO0515 with the Department of Energy */ 00011 /******************************************************************************/ 00012 00013 // $Id$ 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