version 1.48, 2008/12/16 18:56:01
|
version 1.56, 2014/11/10 21:41:04
|
|
|
TRC_OBJECTRESOLUTION, | TRC_OBJECTRESOLUTION, |
TRC_WQL, | TRC_WQL, |
TRC_CQL, | TRC_CQL, |
|
TRC_FQL, |
TRC_THREAD, | TRC_THREAD, |
TRC_EXP_REQUEST_DISP, | TRC_EXP_REQUEST_DISP, |
TRC_SSL, | TRC_SSL, |
|
|
TRC_INDICATION_RECEIPT, | TRC_INDICATION_RECEIPT, |
TRC_CMPIPROVIDERINTERFACE, | TRC_CMPIPROVIDERINTERFACE, |
TRC_WSMSERVER, | TRC_WSMSERVER, |
TRC_LOGMSG |
TRC_RSSERVER, |
|
#ifdef PEGASUS_ENABLE_PROTOCOL_WEB |
|
TRC_WEBSERVER, |
|
#endif /* PEGASUS_ENABLE_PROTOCOL_WEB */ |
|
TRC_LOGMSG, |
|
TRC_WMI_MAPPER_CONSUMER, |
|
TRC_INTERNALPROVIDER |
}; | }; |
| |
/** Token used for tracing functions. | /** Token used for tracing functions. |
|
|
{ | { |
public: | public: |
| |
|
/** Trace Components list defines the strings repesenting each |
|
TraceComponentId entry. Externalized to allow display of the |
|
possible list of trace components. The size of this list is |
|
defined in _NUM_COMPONENTS variable. |
|
*/ |
|
static char const* TRACE_COMPONENT_LIST[]; |
|
|
/** Trace facilities | /** Trace facilities |
File - tracing occurs to the trace file | File - tracing occurs to the trace file |
Log - tracing occurs through the Pegasus Logger class | Log - tracing occurs through the Pegasus Logger class |
|
|
const Uint32 level, | const Uint32 level, |
const CIMException& cimException); | const CIMException& cimException); |
| |
|
/** Formats the message given in data as hex dump if binary is true |
|
@param data Message to be formatted |
|
@param binary flag indicating if message is binary or not |
|
*/ |
|
static SharedArrayPtr<char> traceFormatChars( |
|
const Buffer& data, |
|
bool binary); |
|
|
/** Gets an HTTP request message. | /** Gets an HTTP request message. |
| |
|
Given a binary HTTP request message(application/x-openpegasus |
|
this method returns the request message formatted in hex dump format |
|
and returns. |
|
|
Given an HTTP request message, this method checks if the | Given an HTTP request message, this method checks if the |
message contains a "Basic" authorization header. | message contains a "Basic" authorization header. |
| |
|
|
*/ | */ |
static Boolean setTraceMemoryBufferSize(Uint32 bufferSize); | static Boolean setTraceMemoryBufferSize(Uint32 bufferSize); |
| |
|
/** Set the Max trace File Size and used for the File tracing |
|
@param maxLogFileSizeBytes size of cimserver.trc |
|
*/ |
|
static void setMaxTraceFileSize (const String &size); |
|
|
|
/** Set the Max trace File number |
|
@param maxLogFileNumber number of cimserver.trc in trace folder |
|
*/ |
|
static void setMaxTraceFileNumber(const String &numberOfFiles); |
|
|
/** Flushes the trace buffer to traceFilePath. This method will only | /** Flushes the trace buffer to traceFilePath. This method will only |
have an effect when traceFacility=Memory. | have an effect when traceFacility=Memory. |
*/ | */ |
|
|
(_traceComponentMask & ((Uint64)1 << traceComponent))); | (_traceComponentMask & ((Uint64)1 << traceComponent))); |
} | } |
| |
|
// |
|
//Converts a given string representation of a trace property into Uint32. |
|
//If the string reperesantation is not valid, the returnd bufferSize is 0. |
|
//@param traceProperty The trace property value as string |
|
//@param valueInUint32 Returns the value as Uint32. |
|
//@return Boolean True if specified size is a |
|
// valid string representaion of a Uint32. |
|
static Boolean tracePropertyToUint32( const String& traceProperty, |
|
Uint32& valueInUint32 ); |
|
|
private: | private: |
| |
/** A static single indicator if tracing is turned on allowing to | /** A static single indicator if tracing is turned on allowing to |
|
|
static const char _METHOD_ENTER_MSG[]; | static const char _METHOD_ENTER_MSG[]; |
static const char _METHOD_EXIT_MSG[]; | static const char _METHOD_EXIT_MSG[]; |
| |
|
// Function formats size bytes of binary data given in data in a nicely |
|
// readable hex format and writes the output to targetBuffer |
|
// Return value: Pointer to one byte behind last position that was written |
|
static char* _formatHexDump( |
|
char* targetBuffer, |
|
const char* data,Uint32 size); |
|
|
// 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; | return; |
} | } |
| |
|
|
|
|
#endif /* PEGASUS_REMOVE_TRACE */ | #endif /* PEGASUS_REMOVE_TRACE */ |
| |
//============================================================================== | //============================================================================== |