(file) Return to Tracer.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/Tracer.cpp between version 1.21 and 1.22

version 1.21, 2003/10/22 14:26:04 version 1.22, 2004/06/03 15:04:54
Line 26 
Line 26 
 // Author: Sushma Fernandes, Hewlett-Packard Company (sushma_fernandes@hp.com) // Author: Sushma Fernandes, Hewlett-Packard Company (sushma_fernandes@hp.com)
 // //
 // Modified By: Jenny Yu, Hewlett-Packard Company (jenny_yu@hp.com) // Modified By: Jenny Yu, Hewlett-Packard Company (jenny_yu@hp.com)
   //              Amit K Arora, IBM (amita@in.ibm.com) for PEP#101
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/Common/Tracer.h> #include <Pegasus/Common/Tracer.h>
 #include <Pegasus/Common/Destroyer.h>  
 #include <Pegasus/Common/Thread.h> #include <Pegasus/Common/Thread.h>
 #include <Pegasus/Common/IPC.h> #include <Pegasus/Common/IPC.h>
 #include <Pegasus/Common/System.h> #include <Pegasus/Common/System.h>
Line 84 
Line 84 
 Tracer::Tracer() Tracer::Tracer()
 { {
     // Initialize Trace File Handler     // Initialize Trace File Handler
     _traceHandler=new TraceFileHandler();      _traceHandler.reset(new TraceFileHandler());
     _traceLevelMask=0;     _traceLevelMask=0;
     _traceComponentMask=new Boolean[_NUM_COMPONENTS];      _traceComponentMask.reset(new Boolean[_NUM_COMPONENTS]);
  
     // Initialize ComponentMask array to false     // Initialize ComponentMask array to false
     for (Uint32 index=0;index < _NUM_COMPONENTS;     for (Uint32 index=0;index < _NUM_COMPONENTS;
         _traceComponentMask[index++]=false);          (_traceComponentMask.get())[index++]=false);
 } }
  
 //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
Line 98 
Line 98 
 //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
 Tracer::~Tracer() Tracer::~Tracer()
 { {
     delete []_traceComponentMask;  
     delete _traceHandler;  
     delete _tracerInstance;     delete _tracerInstance;
 } }
  
Line 385 
Line 383 
     {     {
         return false;         return false;
     }     }
     return ((instance->_traceComponentMask[traceComponent]) &&      return (((instance->_traceComponentMask.get())[traceComponent]) &&
             (traceLevel  & instance->_traceLevelMask));             (traceLevel  & instance->_traceLevelMask));
 } }
  
Line 628 
Line 626 
         if (String::equalNoCase(componentStr,"ALL"))         if (String::equalNoCase(componentStr,"ALL"))
         {         {
             for (index=0; index < _NUM_COMPONENTS;             for (index=0; index < _NUM_COMPONENTS;
                     _getInstance()->_traceComponentMask[index++] = true);                      (_getInstance()->_traceComponentMask.get())[index++] = true);
             return ;             return ;
         }         }
  
         // initialise ComponentMask array to False         // initialise ComponentMask array to False
         for (index = 0;index < _NUM_COMPONENTS;         for (index = 0;index < _NUM_COMPONENTS;
                 _getInstance()->_traceComponentMask[index++] = false);                  (_getInstance()->_traceComponentMask.get())[index++] = false);
  
         // Append _COMPONENT_SEPARATOR to the end of the traceComponents         // Append _COMPONENT_SEPARATOR to the end of the traceComponents
         componentStr.append(_COMPONENT_SEPARATOR);         componentStr.append(_COMPONENT_SEPARATOR);
Line 653 
Line 651 
                 if (String::equalNoCase(                 if (String::equalNoCase(
                        componentName,TRACE_COMPONENT_LIST[index]))                        componentName,TRACE_COMPONENT_LIST[index]))
                 {                 {
                     _getInstance()->_traceComponentMask[index]=true;                      (_getInstance()->_traceComponentMask.get())[index]=true;
  
                     // Found component, break from the loop                     // Found component, break from the loop
                     break;                     break;
Line 672 
Line 670 
     {     {
         // initialise ComponentMask array to False         // initialise ComponentMask array to False
         for (Uint32 index = 0;index < _NUM_COMPONENTS;         for (Uint32 index = 0;index < _NUM_COMPONENTS;
                  _getInstance()->_traceComponentMask[index++] = false);                   (_getInstance()->_traceComponentMask.get())[index++] = false);
     }     }
     return ;     return ;
 } }


Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2