Generates a message from a set of predefined messages in a message file and logs the generated message in the connector's log destination.
Syntax
void generateAndLogMsg(int msgNum, int msgType, int argCount, ...);
Parameters
XRD_WARNING XRD_ERROR XRD_FATAL XRD_INFO XRD_TRACE
Return values
None.
Notes
The generateAndLogMsg() method combines the functionality of the generateMsg() and logMsg() methods. By combining these two methods, generateAndLogMsg() frees up the memory required for the message string that generateMsg() produces.
Examples
The following example performs the same task as the example provides for the generateMsg() method:
ret_code = connect_to_app(userName, password); // Message 1100 - Failed to connect to application if (ret_code == -1) { msg = generateAndLogMsg(1100, CxMsgFormat::XRD_ERROR, 0, NULL); return BON_FAIL; }