00001 /*****************************************************************************/ 00002 /* */ 00003 /* XrdMonCtrDebug.hh */ 00004 /* */ 00005 /* (c) 2005 by the Board of Trustees of the Leland Stanford, Jr., University */ 00006 /* All Rights Reserved */ 00007 /* Produced by Jacek Becla for Stanford University under contract */ 00008 /* DE-AC02-76SF00515 with the Department of Energy */ 00009 /*****************************************************************************/ 00010 00011 // $Id: XrdMonCtrDebug.hh 22437 2008-03-04 14:35:16Z rdm $ 00012 00013 #ifndef XRDMONCTRDEBUG_HH 00014 #define XRDMONCTRDEBUG_HH 00015 00016 #include "XrdSys/XrdSysPthread.hh" 00017 00018 // class responsible for handling log/debug/error messages 00019 00020 class XrdMonCtrDebug { 00021 public: 00022 enum Verbosity { 00023 Quiet = 0x0000, // No printing 00024 00025 Receiving = 0x0001, // related to receiving data from xrootd 00026 PathDec = 0x0002, // for path decoder, use with PathCod to compare 00027 DataDec = 0x0004, // for data decoder, use with DataCod to compare 00028 IdDec = 0x0008, // for id decoder, use with IdCod to compare 00029 Sink = 0x0010, // related to sink 00030 // ======= 00031 All = 0xFFFF // Everything 00032 }; 00033 00034 static void initialize(); 00035 00036 inline static bool verbose(Verbosity val) { 00037 return _verbose & val; 00038 } 00039 00040 static XrdSysMutex _mutex; 00041 00042 private: 00043 static Verbosity _verbose; 00044 }; 00045 00046 #endif /* XRDMONCTRDEBUG_HH */