Previous Topic: Java Proxy ObjectNext Topic: Execution Methods


Trace Control Methods

There are five trace control methods. They are always generated with every Java proxy object. These methods are used to start, stop and write trace messages using the CA Gen trace capabilities.

Note: When used in this context, Trace refers to runtime logging capability and you should not confuse this Trace with Diagram Trace used to debug generated action block logic.

The following table lists the five trace control methods:

Trace Control Method

Comments

StartTracing()

Turns on tracing with the output going to the file, trace-{program}-{pid}.out, in the “%USERPROFILE%\AppData\Local\CA\Gen xx\logs\{app style directory}".

Note: xx refers to the current release of CA Gen. For the current release number, see the Release Notes.

StartTracing(String filename)

Turns on tracing with the output going to a file specified by the filename parameter.

StartTracing(Writer writer)

Turns on tracing with the output going to the TextWriter parameter passed in.

TraceOut(string message)

Writes the message to the trace output if tracing is enabled at that time. If tracing is not enabled, the method simply returns.

StopTracing()

Turns off all tracing.

Tracing in the CA Gen runtime is global in scope. If one proxy turns it on, it is enabled for all the proxies running in the same process.