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

Diff for /pegasus/src/Pegasus/Common/Tracer.h between version 1.36 and 1.39

version 1.36, 2008/05/27 17:32:57 version 1.39, 2008/09/02 17:33:37
Line 72 
Line 72 
     enum TRACE_FACILITY_INDEX     enum TRACE_FACILITY_INDEX
     {     {
         TRACE_FACILITY_FILE = 0,         TRACE_FACILITY_FILE = 0,
         TRACE_FACILITY_LOG  = 1          TRACE_FACILITY_LOG  = 1,
           TRACE_FACILITY_MEMORY = 2
     };     };
  
  
Line 162 
Line 163 
     */     */
     static Uint32 setTraceFacility(const String& traceFacility);     static Uint32 setTraceFacility(const String& traceFacility);
  
       /** Get trace facility currently in use
           @return TRACE_FACILITY_FILE - if trace facility is file
                   TRACE_FACILITY_LOG - if trace facility is the log
       */
       static Uint32 getTraceFacility();
   
       /** Set buffer size to be used for the memory tracing facility
           @param bufferSize buffer size in Kbyte to be used for memory tracing
           @return true   if function was successfully.
       */
       static Boolean setTraceMemoryBufferSize(Uint32 bufferSize);
   
       /** Flushes the trace buffer to traceFilePath. This method will only
           have an effect when traceFacility=Memory.
       */
       static void flushTrace();
   
     /** Traces method entry.     /** Traces method entry.
         @param token           TracerToken         @param token           TracerToken
         @param fileName        filename of the trace originator         @param fileName        filename of the trace originator
Line 260 
Line 278 
     static const Uint32 _STRLEN_MAX_UNSIGNED_INT;     static const Uint32 _STRLEN_MAX_UNSIGNED_INT;
     static const Uint32 _STRLEN_MAX_PID_TID;     static const Uint32 _STRLEN_MAX_PID_TID;
     AutoArrayPtr<Boolean> _traceComponentMask;     AutoArrayPtr<Boolean> _traceComponentMask;
       Uint32                _traceMemoryBufferSize;
     Uint32                _traceFacility;     Uint32                _traceFacility;
     //Is true if any components are set at the component mask     //Is true if any components are set at the component mask
     Boolean               _componentsAreSet;     Boolean               _componentsAreSet;
     Uint32                _traceLevelMask;     Uint32                _traceLevelMask;
     AutoPtr<TraceHandler> _traceHandler;      TraceHandler*         _traceHandler;
     String              _moduleName;     String              _moduleName;
     static Tracer*      _tracerInstance;     static Tracer*      _tracerInstance;
  
Line 275 
Line 294 
     // Factory function to create an instance of the matching trace handler     // Factory function to create an instance of the matching trace handler
     // for the given type of traceFacility.     // for the given type of traceFacility.
     // @param    traceFacility  type of trace handler to create     // @param    traceFacility  type of trace handler to create
     // @return   an instance of a trace handler class. For invalid trace      void _setTraceHandler( Uint32 traceFacility );
     //           facilities always creates a traceFileHandler.  
     TraceHandler* getTraceHandler( Uint32 traceFacility );  
  
     // Traces the given message. Overloaded to include the file name and the     // Traces the given message. Overloaded to include the file name and the
     // line number as one of the parameters.     // line number as one of the parameters.
Line 359 
Line 376 
  
 #ifdef PEGASUS_REMOVE_TRACE #ifdef PEGASUS_REMOVE_TRACE
  
   inline void Tracer::setTraceHandler( Uint32 traceFacility );
   {
       // empty function
   }
   
 inline void Tracer::traceCString( inline void Tracer::traceCString(
     const char* fileName,     const char* fileName,
     const Uint32 lineNum,     const Uint32 lineNum,
Line 403 
Line 425 
 inline Uint32 Tracer::setTraceFacility(const String& traceComponents) inline Uint32 Tracer::setTraceFacility(const String& traceComponents)
 { {
     // empty function     // empty function
       return 0;
   }
   
   inline Uint32 Tracer::getTraceFacility()
   {
       // empty function
       return 0;
   }
   
   inline static Boolean Trace::setTraceMemoryBufferSize(Uint32 bufferSize)
   {
       // empty function
       return true;
   }
   
   inline void Tracer::flushTrace()
   {
       // empty function
       return;
 } }
  
 #endif /* PEGASUS_REMOVE_TRACE */ #endif /* PEGASUS_REMOVE_TRACE */
Line 427 
Line 468 
  
 # define PEG_METHOD_ENTER(comp,meth) # define PEG_METHOD_ENTER(comp,meth)
 # define PEG_METHOD_EXIT() # define PEG_METHOD_EXIT()
 # define PEG_TRACE_STRING(comp,level,string)  
 # define PEG_TRACE(VAR_ARGS) # define PEG_TRACE(VAR_ARGS)
 # define PEG_TRACE_CSTRING(comp,level,chars) # define PEG_TRACE_CSTRING(comp,level,chars)
  
Line 458 
Line 498 
     while (0)     while (0)
 # endif # endif
  
 // Macro for Trace String.  the do construct allows this to appear  
 // as a single statement.  
 # define PEG_TRACE_STRING(comp, level, string) \  
     do \  
     { \  
         if (Tracer::isTraceOn()) \  
         { \  
             if (Tracer::isTraceEnabled(comp, level)) \  
             { \  
                 Tracer::traceCString(PEGASUS_FILE_LINE_COMMA \  
                                      comp, \  
                                      (const char*) (string).getCString()); \  
             } \  
         } \  
     } \  
     while (0)  
   
 // Macro to trace character lists.  the do construct allows this to appear // Macro to trace character lists.  the do construct allows this to appear
 // as a single statement. // as a single statement.
 # define PEG_TRACE_CSTRING(comp, level, chars) \ # define PEG_TRACE_CSTRING(comp, level, chars) \


Legend:
Removed from v.1.36  
changed lines
  Added in v.1.39

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2