cwbSV_SetTraceComponent

Purpose

This function allows setting of a unique component identifier in service entry that is provided. Along with setting the product ID (see cwbSV_SetTraceProduct), this call should be used to distinguish your trace entries from other product's entries in the trace file.

Syntax

 
unsigned int CWB_ENTRY cwbSV_SetTraceComponent(
                             cwbSV_TraceDataHandle  traceDataHandle,
                             char                  *componentID);

Parameters

cwbSV_TraceDataHandle traceDataHandle - input
Handle that was returned by a previous call to cwbSV_CreateTraceDataHandle().
char * componentID - input
Points to a null-terminated string that contains a component identifier to be used on this trace entry. NOTE: A maximum of CWBSV_MAX_COMP_ID characters will be logged for the component ID. Larger strings will be truncated.

Return Codes

The following list shows common return values.

CWB_OK
Successful completion.
CWB_INVALID_HANDLE
Handle is not valid.

Usage

This value should be set before calling the corresponding log function, "cwbSV_LogTraceData()". The suggested hierarchy is that you would define a product ID with one or many components that are defined under it.