xrootd
XrdSecgsiTrace.hh
Go to the documentation of this file.
1 // $Id$
2 #ifndef ___SECGSI_TRACE_H___
3 #define ___SECGSI_TRACE_H___
4 /******************************************************************************/
5 /* */
6 /* X r d S e c g s i T r a c e . h h */
7 /* */
8 /* (C) 2005 G. Ganis, CERN */
9 /* */
10 /******************************************************************************/
11 
12 #include <XrdOuc/XrdOucTrace.hh>
13 
14 #ifndef NODEBUG
15 
16 #include "XrdSys/XrdSysHeaders.hh"
17 
18 #define QTRACE(act) (gsiTrace && (gsiTrace->What & TRACE_ ## act))
19 #define PRINT(y) {if (gsiTrace) {gsiTrace->Beg(epname); \
20  cerr <<y; gsiTrace->End();}}
21 #define TRACE(act,x) if (QTRACE(act)) PRINT(x)
22 #define DEBUG(y) TRACE(Debug,y)
23 #define EPNAME(x) static const char *epname = x;
24 
25 #else
26 
27 #define QTRACE(x)
28 #define PRINT(x)
29 #define TRACE(x,y)
30 #define DEBUG(x)
31 #define EPNAME(x)
32 
33 #endif
34 
35 #define TRACE_ALL 0x000f
36 #define TRACE_Authenxx 0x0007
37 #define TRACE_Authen 0x0004
38 #define TRACE_Debug 0x0001
39 
40 //
41 // For error logging and tracing
42 extern XrdOucTrace *gsiTrace;
43 
44 #endif