xrootd
|
00001 #ifndef _XRD_TRACE_H 00002 #define _XRD_TRACE_H 00003 /******************************************************************************/ 00004 /* */ 00005 /* X r d T r a c e . h h */ 00006 /* */ 00007 /* (C) 2004 by the Board of Trustees of the Leland Stanford, Jr., University */ 00008 /* All Rights Reserved. See XrdInfo.cc for complete License Terms */ 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 // Trace flags 00016 // 00017 #define TRACE_NONE 0x0000 00018 #define TRACE_ALL 0x0fff 00019 #define TRACE_DEBUG 0x0001 00020 #define TRACE_CONN 0x0002 00021 #define TRACE_MEM 0x0004 00022 #define TRACE_NET 0x0008 00023 #define TRACE_POLL 0x0010 00024 #define TRACE_PROT 0x0020 00025 #define TRACE_SCHED 0x0040 00026 00027 #ifndef NODEBUG 00028 00029 #include "XrdSys/XrdSysHeaders.hh" 00030 #include "XrdOuc/XrdOucTrace.hh" 00031 00032 #ifndef XRD_TRACE 00033 #define XRD_TRACE XrdTrace. 00034 #endif 00035 00036 #define TRACE(act, x) \ 00037 if (XRD_TRACE What & TRACE_ ## act) \ 00038 {XRD_TRACE Beg(TraceID); cerr <<x; XRD_TRACE End();} 00039 00040 #define TRACEI(act, x) \ 00041 if (XRD_TRACE What & TRACE_ ## act) \ 00042 {XRD_TRACE Beg(TraceID,TRACELINK->ID); cerr <<x; \ 00043 XRD_TRACE End();} 00044 00045 #define TRACING(x) XRD_TRACE What & x 00046 00047 #else 00048 00049 #define TRACE(act,x) 00050 #define TRACEI(act,x) 00051 #define TRACING(x) 0 00052 #endif 00053 00054 #endif