logMsg()

Logs a message to the connector's log destination.

Syntax

void logMsg(char * msg);
  

Parameters

msg [in]
is a pointer to the message text.

Return values

None.

Notes

To generate the message string for logMsg(), use the generateMsg() method. The generateMsg() method retrieves a predefined message from a message file, formats the text, and returns a pointer to a generated message string.

Connector messages logged with logMsg() are viewable using LogViewer if the message strings were generated with generateMsg(). Trace messages logged with traceWrite() are not displayed in the LogViewer.

Note:
The logMsg() method is also available in the GenGlobals class. It is provided in the BOHandlerCPP class for access to logging from within the business object handler.

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.

Copyright IBM Corp. 1997, 2003