Logging

Component Enabler can provide a client side trace that shows the details of messages being sent to and received from the host application. Using this trace can help solve problems with the client application and is a useful debug tool for Unisys support.

To use logging in a non-Java environment, the application must be able to create a reference to the Component Enabler log object. One way to do this is to register the Java logging object as a COM object with Windows. The statement to do this is as follows:

JavaReg /register /class:com.unisys.util.Log /progid:Log.java.1

JavaReg is supplied with the Microsoft SDK and can be used to register any Java class as a COM object. The registration statement need only be executed once on a client system using a DOS command session.

Once this statement has been executed, an instance of the log object can be created using the following statement:

Set mvarLogObject = CreateObject("Log.java.1")

The alternative is to use the Java label to specify that the object is a Java class. The equivalent statement is then:

Set mvarLogObject = CreateObject("java:com/unisys/util/Log")