version 1.38, 2008/08/28 17:24:36
|
version 1.40, 2008/09/03 17:48:05
|
|
|
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 |
}; | }; |
| |
| |
|
|
*/ | */ |
static Uint32 getTraceFacility(); | 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 |
|
|
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; |
| |
|
|
// 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. |
|
|
return 0; | return 0; |
} | } |
| |
|
inline Boolean Tracer::setTraceMemoryBufferSize(Uint32 bufferSize) |
|
{ |
|
// empty function |
|
return true; |
|
} |
|
|
|
inline void Tracer::flushTrace() |
|
{ |
|
// empty function |
|
return; |
|
} |
|
|
#endif /* PEGASUS_REMOVE_TRACE */ | #endif /* PEGASUS_REMOVE_TRACE */ |
| |
//============================================================================== | //============================================================================== |