7 1 Create a Trace Handler

Visual LANSA

7.1 Create a Trace Handler

Firstly, you need to create an object in your application to act as the trace handler. This object must implement the iTraceHandler interface supplied with Visual LANSA which has the following methods available:

  • Initialize – Invoked when the trace handler is installed as the active trace handler for the application
  • Terminate – Invoked when the trace handler is uninstalled
  • TraceMessage – Called when either the TraceMessageText or TraceMessageData method is invoked in your application RDMLX code.
  • TracingState - Called when either the TraceMessageText or TraceMessageData method is invoked in your application RDMLX code. Can be True or False.

This Trace Handler object must be installed as part of your application and will act as the system trace handler at run time.

Refer to 7.2 Example Trace Handler to get started.