xrootd
XrdSecTrace.hh
Go to the documentation of this file.
1 #ifndef ___SEC_TRACE_H___
2 #define ___SEC_TRACE_H___
3 /******************************************************************************/
4 /* */
5 /* X r d S e c T r a c e . h h */
6 /* */
7 /* (C) 2003 by the Board of Trustees of the Leland Stanford, Jr., University */
8 /* All Rights Reserved */
9 /* Produced by Andrew Hanushevsky for Stanford University under contract */
10 /* DE-AC03-76-SFO0515 with the Deprtment of Energy */
11 /******************************************************************************/
12 
13 // $Id$
14 
15 #include "XrdOuc/XrdOucTrace.hh"
16 
17 #ifndef NODEBUG
18 
19 #include "XrdSys/XrdSysHeaders.hh"
20 
21 #define QTRACE(act) SecTrace->What & TRACE_ ## act
22 
23 #define TRACE(act, x) \
24  if (QTRACE(act)) \
25  {SecTrace->Beg(epname,tident); cerr <<x; SecTrace->End();}
26 
27 #define DEBUG(y) if (QTRACE(Debug)) \
28  {SecTrace->Beg(epname); cerr <<y; SecTrace->End();}
29 #define EPNAME(x) static const char *epname = x;
30 
31 #else
32 
33 #define TRACE(x, y)
34 #define QTRACE(x)
35 #define DEBUG(x)
36 #define EPNAME(x)
37 
38 #endif
39 
40 // Trace flags
41 //
42 #define TRACE_ALL 0x000f
43 #define TRACE_Authenxx 0x0007
44 #define TRACE_Authen 0x0004
45 #define TRACE_Debug 0x0001
46 
47 #endif