XrdCmsTrace.hh

Go to the documentation of this file.
00001 #ifndef _XRDCMS_TRACE_H
00002 #define _XRDCMS_TRACE_H
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                        X r d C m s T r a c e . h h                         */
00006 /*                                                                            */
00007 /* (c) 2007 by the Board of Trustees of the Leland Stanford, Jr., University  */
00008 /*                            All Rights Reserved                             */
00009 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
00010 /*              DE-AC02-76-SFO0515 with the Department of Energy              */
00011 /******************************************************************************/
00012 
00013 //         $Id: XrdCmsTrace.hh 32231 2010-02-05 18:24:46Z ganis $
00014 
00015 #include "XrdSys/XrdSysError.hh"
00016 #include "XrdOuc/XrdOucTrace.hh"
00017 
00018 #define TRACE_ALL       0xffff
00019 #define TRACE_Debug     0x0001
00020 #define TRACE_Stage     0x0002
00021 #define TRACE_Defer     0x0004
00022 #define TRACE_Forward   0x0008
00023 #define TRACE_Redirect  0x0010
00024 #define TRACE_Files     0x0020
00025 
00026 #ifndef NODEBUG
00027 
00028 #include "XrdSys/XrdSysHeaders.hh"
00029 
00030 #define QTRACE(act) Trace.What & TRACE_ ## act
00031 
00032 #define DEBUGR(y) if (Trace.What & TRACE_Debug) \
00033                   {Trace.Beg(epname, Arg.Ident); cerr <<y; Trace.End();}
00034 
00035 #define DEBUG(y) if (Trace.What & TRACE_Debug) TRACEX(y)
00036 
00037 #define TRACE(x,y) if (Trace.What & TRACE_ ## x) TRACEX(y)
00038 
00039 #define TRACER(x,y) if (Trace.What & TRACE_ ## x) \
00040                        {Trace.Beg(epname, Arg.Ident); cerr <<y; Trace.End();}
00041 
00042 #define TRACEX(y) {Trace.Beg(0,epname); cerr <<y; Trace.End();}
00043 
00044 #define EPNAME(x) static const char *epname = x;
00045 
00046 #else
00047 
00048 #define DEBUG(y)
00049 #define TRACE(x, y)
00050 #define EPNAME(x)
00051 
00052 #endif
00053 
00054 namespace XrdCms
00055 {
00056 extern    XrdOucTrace Trace;
00057 extern    XrdSysError Say;
00058 }
00059 #endif

Generated on Tue Jul 5 14:46:32 2011 for ROOT_528-00b_version by  doxygen 1.5.1