xrootd
|
00001 // $Id$ 00002 #ifndef ___CRYPTO_TRACE_H___ 00003 #define ___CRYPTO_TRACE_H___ 00004 /******************************************************************************/ 00005 /* */ 00006 /* X r d C r y p t o T r a c e . h h */ 00007 /* */ 00008 /* (C) 2005 by the Board of Trustees of the Leland Stanford, Jr., University */ 00009 /* All Rights Reserved */ 00010 /* Produced by Andrew Hanushevsky for Stanford University under contract */ 00011 /* DE-AC03-76-SFO0515 with the Deprtment of Energy */ 00012 /******************************************************************************/ 00013 00014 #include <XrdOuc/XrdOucTrace.hh> 00015 #include <XrdCrypto/XrdCryptoAux.hh> 00016 00017 #ifndef NODEBUG 00018 00019 #include "XrdSys/XrdSysHeaders.hh" 00020 00021 #define QTRACE(act) (cryptoTrace && (cryptoTrace->What & cryptoTRACE_ ## act)) 00022 #define PRINT(y) {if (cryptoTrace) {cryptoTrace->Beg(epname); \ 00023 cerr <<y; cryptoTrace->End();}} 00024 #define TRACE(act,x) if (QTRACE(act)) PRINT(x) 00025 #define DEBUG(y) TRACE(Debug,y) 00026 #define EPNAME(x) static const char *epname = x; 00027 00028 #else 00029 00030 #define QTRACE(x) 00031 #define PRINT(x) 00032 #define TRACE(x,y) 00033 #define DEBUG(x) 00034 #define EPNAME(x) 00035 00036 #endif 00037 00038 // 00039 // For error logging and tracing 00040 extern XrdOucTrace *cryptoTrace; 00041 00042 #endif