XRootD
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 #define TRACE_FILES 0x0010
14 #define TRACE_CONNS 0x0020
15 
16 #ifndef NODEBUG
17 
18 #include "XrdSys/XrdSysHeaders.hh"
19 #include "XrdOuc/XrdOucTrace.hh"
20 
21 #ifndef XRD_TRACE
22 #define XRD_TRACE m_trace->
23 #endif
24 
25 #define TRACE(act, x) \
26  if (XRD_TRACE What & TRACE_ ## act) \
27  {XRD_TRACE Beg(TraceID); std::cerr <<x; XRD_TRACE End();}
28 
29 #define TRACEI(act, x) \
30  if (XRD_TRACE What & TRACE_ ## act) \
31  {XRD_TRACE Beg(TraceID,TRACELINK->ID); std::cerr <<x; \
32  XRD_TRACE End();}
33 
34 #define TRACING(x) XRD_TRACE What & x
35 
36 #else
37 
38 #define TRACE(act,x)
39 #define TRACEI(act,x)
40 #define TRACING(x) 0
41 #endif
42 
43 #endif
44