Generates a message and sends it to 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. It generates a message from a message file and then sends it to the log destination. You establish the name of a connector's log destination through the Logging section in the Trace/Log File tab of Connector Configurator.
IBM recommends that log messages be contained in a message file and extracted with the generateAndLogMsg() method. This message file should be the connector message file, which contains messages specific to your connector.
Connector messages logged with generateAndLogMsg() are viewable using LogViewer.
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; }
See also