logMsg()

Logs a message to the connector's log destination.

Syntax

public final static void logMsg(String msg);
public final static void logMsg(String msg, int severity);

Parameters

msg
Is the message text to be logged.

severity
Is one of the following message types:

JavaConnectorUtil.XRD_WARNING
 

JavaConnectorUtil.XRD_ERROR
 

JavaConnectorUtil.XRD_FATAL
 

JavaConnectorUtil.XRD_INFO

 
JavaConnectorUtil.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.

WebSphere InterChange Server

If severity is XRD_ERROR or XRD_FATAL and the connector configuration property LogAtInterchangeEnd is set, the error message is logged and an email notification is sent when email notification is on. See the System Administration Guide in the IBM WebSphere InterChange Server documentation set for information on how to set up email notification for errors.

Connector messages logged with logMsg() are viewable using LogViewer if the message strings were generated with generateMsg().

See also

See the description of the generateMsg() method.

Copyright IBM Corp. 1997, 2004