Logging messages with custom IDs
If the Logger class is invoked at run time, the messages are logged to the Director client log. If the Logger class is invoked at design time, the messages are logged to the Connector Access Service log. At run time, you can log a message with the message ID that is defined in the Java™ Integration stage or log a message with a custom message ID that is defined in your Java code.
You can use the following methods of the Logger class
in your Java code to log messages
with custom message IDs to the Director client log:
setComponentID(String compID)
debug(int messageNumber, String message)
information(int messageNumber, String message)
warning(int messageNumber, String message)
In
the following example an informational message Job completed
successfully is logged with the message ID IIS-CONN-MYCONN-00123.
Logger.setComponentID("MYCONN");
Logger.information(123, "Job completed successfully");