A connector can send information about its state to a log destination. The following types of information are recommended for logging:
Although a connector can send informational or error messages, this logging process is referred to as error logging.
A connector sends its log messages into its log destination. The log is an external destination that is available for viewing by those needing to review the execution state of the connector. The log destination is defined at connector configuration time by the setting of the Logging field in the Trace/Log Files tab of Connector Configurator as one of the following:
By default, the connector's log destination is set to the console, which indicates use of the startup script's command prompt window as the log destination. Set this log destination as appropriate for your connector.
You can also set the LogAtInterchangeEnd connector configuration property to indicate whether messages are also logged to the InterChange Server's log destination:
By default, LogAtInterchangeEnd is set to false, so that messages are only logged locally. If messages are sent to InterChange Server, they are written to the destination specified for InterChange Server messages.
These connector properties are set with Connector Configurator. For more information on InterChange Server's message logging, see the System Administration Guide in the IBM WebSphere InterChange Server documentation set.
Table 53 shows the ways that a connector sends an error, warning, and information message to its log destination.
For more information on how to generate a message, see Generating a message string.
In the Java connector library, the logMsg(), generateMsg(), and generateAndLogMsg() methods are defined in the CWConnectorUtil class.
Both the generateMsg() and generateAndLogMsg() methods require a message type as an argument. This argument indicates the severity of the message. For more information, see Generating a message string.