xrootd
XrdSutTrace.hh
Go to the documentation of this file.
1 // $Id$
2 #ifndef ___SUT_TRACE_H___
3 #define ___SUT_TRACE_H___
4 /******************************************************************************/
5 /* */
6 /* X r d S u t T r a c e . h h */
7 /* */
8 /* (C) 2005 by the Board of Trustees of the Leland Stanford, Jr., University */
9 /* All Rights Reserved */
10 /* Produced by Andrew Hanushevsky for Stanford University under contract */
11 /* DE-AC03-76-SFO0515 with the Deprtment of Energy */
12 /******************************************************************************/
13 #ifndef ___OUC_TRACE_H___
14 #include "XrdOuc/XrdOucTrace.hh"
15 #endif
16 #ifndef ___SUT_AUX_H___
17 #include "XrdSut/XrdSutAux.hh"
18 #endif
19 
20 #ifndef NODEBUG
21 
22 #include "XrdSys/XrdSysHeaders.hh"
23 
24 #define QTRACE(act) (sutTrace && (sutTrace->What & sutTRACE_ ## act))
25 #define PRINT(y) {if (sutTrace) {sutTrace->Beg(epname); \
26  cerr <<y; sutTrace->End();}}
27 #define TRACE(act,x) if (QTRACE(act)) PRINT(x)
28 #define DEBUG(y) TRACE(Debug,y)
29 #define EPNAME(x) static const char *epname = x;
30 
31 #else
32 
33 #define QTRACE(x)
34 #define PRINT(x)
35 #define TRACE(x,y)
36 #define DEBUG(x)
37 #define EPNAME(x)
38 
39 #endif
40 
41 //
42 // For error logging and tracing
43 extern XrdOucTrace *sutTrace;
44 
45 #endif