Logs a message to the connector's log destination. Log messages must be contained in a message file that you provide for your connector.
Syntax
void logMsg(char * msg); void logMsg(char * msg, int severity);
Parameters
XRD_WARNING XRD_ERROR XRD_FATAL XRD_INFO XRD_TRACE
Return values
None.
Notes
The logMsg() method sends the specified msg text 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 generateMsg() method. This message file should be the connector message file, which contains messages specific to your connector. The generateMsg() method generates the message string for logMsg(). It retrieves a predefined message from a message file, formats the text, and returns a generated message string.
Connector messages logged with logMsg() are viewable using LogViewer if the message strings were generated with generateMsg().
Examples
if ((form = CreateMainForm(conn, getFormName(theObj))) < 0) { msg = generateMsg(10, CxMsgFormat::XRD_FATAL, NULL, 0, NULL); logMsg(msg); }
See also
See the description of the GenGlobals::generateMsg() utility.