Generates a trace message from a set of predefined messages in a message file and sends the generated trace message to the connector's log destination.
Syntax
void generateAndTraceMsg(int msgNum, int msgType, int traceLevel, int argCount, ...);
Parameters
XRD_WARNING XRD_ERROR XRD_FATAL XRD_INFO XRD_TRACE
CWConnectorUtil.LEVEL1 CWConnectorUtil.LEVEL2 CWConnectorUtil.LEVEL3 CWConnectorUtil.LEVEL4 CWConnectorUtil.LEVEL5
The method writes the trace message when the current trace level is greater than or equal to traceLevel.
Return values
None.
Notes
The generateAndTraceMsg() method combines the functionality of the generateMsg() and traceWrite() methods. By combining these two methods, generateAndTraceMsg() frees up the memory required for the message string that generateMsg() produces. You no longer need to include the call to the freeMemory() method to release the memory allocated for the message string.
Examples
if(tracePtr->getTraceLevel()>= Tracing::LEVEL3) { // Message 3033 - Opened main form for object msg = generateAndTraceMsg(3033,CxMsgFormat::XRD_FATAL, Tracing::LEVEL3,0, NULL); }