xrootd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
XrdThrottleTrace.hh
Go to the documentation of this file.
1 
2 #ifndef _XRDTHROTTLE_TRACE_H
3 #define _XRDTHROTTLE_TRACE_H
4 
5 // Trace flags
6 //
7 #define TRACE_NONE 0x0000
8 #define TRACE_ALL 0x0fff
9 #define TRACE_BANDWIDTH 0x0001
10 #define TRACE_IOPS 0x0002
11 #define TRACE_IOLOAD 0x0004
12 #define TRACE_DEBUG 0x0008
13 
14 #ifndef NODEBUG
15 
16 #include "XrdSys/XrdSysHeaders.hh"
17 #include "XrdOuc/XrdOucTrace.hh"
18 
19 #ifndef XRD_TRACE
20 #define XRD_TRACE m_trace->
21 #endif
22 
23 #define TRACE(act, x) \
24  if (XRD_TRACE What & TRACE_ ## act) \
25  {XRD_TRACE Beg(TraceID); cerr <<x; XRD_TRACE End();}
26 
27 #define TRACEI(act, x) \
28  if (XRD_TRACE What & TRACE_ ## act) \
29  {XRD_TRACE Beg(TraceID,TRACELINK->ID); cerr <<x; \
30  XRD_TRACE End();}
31 
32 #define TRACING(x) XRD_TRACE What & x
33 
34 #else
35 
36 #define TRACE(act,x)
37 #define TRACEI(act,x)
38 #define TRACING(x) 0
39 #endif
40 
41 #endif
42