xrootd
XrdCryptosslTrace.hh
Go to the documentation of this file.
1 // $Id$
2 #ifndef ___CRYPTOSSL_TRACE_H___
3 #define ___CRYPTOSSL_TRACE_H___
4 /******************************************************************************/
5 /* */
6 /* X r d C r y p t o S s l 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 
14 #include <XrdOuc/XrdOucTrace.hh>
16 
17 #ifndef NODEBUG
18 
19 #include "XrdSys/XrdSysHeaders.hh"
20 
21 #define QTRACE(act) (sslTrace && (sslTrace->What & cryptoTRACE_ ## act))
22 #define PRINT(y) {if (sslTrace) {sslTrace->Beg(epname); \
23  cerr <<y; sslTrace->End();}}
24 #define TRACE(act,x) if (QTRACE(act)) PRINT(x)
25 #define DEBUG(y) TRACE(Debug,y)
26 #define EPNAME(x) static const char *epname = x;
27 
28 #else
29 
30 #define QTRACE(x)
31 #define PRINT(x)
32 #define TRACE(x,y)
33 #define DEBUG(x)
34 #define EPNAME(x)
35 
36 #endif
37 
38 //
39 // For error logging and tracing
40 extern XrdOucTrace *sslTrace;
41 
42 #endif