Try OpenEdge Now
skip to main content
Debugging and Troubleshooting
Troubleshooting Resources : Log Entry Types Detail : ABL trace logging
 

ABL trace logging

Specifying the ABL trace (4GLTrace) log entry type turns on logging for the execution of internal procedures, user-defined functions, persistent triggers, named events, and class events (generated by the RUN, FUNCTION, PUBLISH, and SUBSCRIBE statements, and (for class events) by the Publish( ), Subscribe( ), and Unsubscribe( ) event methods, respectively). Class events can also include subscribing and unsubscribing handlers for .NET events and publishing ABL implementations of inherited .NET abstract events. It also logs the instantiation and use of classes, including execution of constructors (invoked by the NEW phrase and also by the SUPER and THIS-OBJECT statements), the execution of methods defined within classes (including those invoked using the SUPER system reference), the execution of property accessor methods (invoked by accessing a property of a class), and the execution of destructors (invoked by executing the DELETE OBJECT statement).
ABL trace logging is available on all ABL clients including GUI clients, character clients, WebSpeed agents, and AppServer agents. Log entries generated for this type contain the tag 4GLTrace.
ABL trace logging logs an entry message when execution begins. Entry messages are logged at Level 2 (Basic) and higher. ABL trace logging also logs a return message to indicate when the application returned. Return messages are logged at Level 3 (Verbose) and higher.

Syntax

The general format for ABL trace log messages is:
type routine-name [PERS TRIG][in routine-name][PERSIST] "input-param" [caller - source @ line-number]
type
The log message entry type. The following table lists the log message entry types.
Table 37. ABL trace log message entry types
Type
Description
Delete
Deleting class instances
Function
Invoking user-defined functions
Invoke
Invoking methods
New
Instantiating classes
Publish
Publishing both named and class events
Run
Running procedures
Subscribe
Subscribing handlers for both named and class events
Super
Invoking super class methods
Unsubscribe
Unsubscribing handlers for class events only
routine-name
Procedure or function name being executed. For classes, this is the name of the class being instantiated or destroyed, or the name of the invoked method.
PERS TRIG
Indicates that the procedure runs as a result of a persistent trigger. In this case, this is the only piece of information in the log entry after the routine-name.
in routine-name
For procedures, logs the calling routine-name. For example, RUNxxinyy statement, logs yy as the routine-name. For functions and methods, logs the function or method when the function or method is not located in the caller procedure or class.
PERSIST
Indicates the RUN statement has the PERSISTENT clause.
input-param
List of input and input-output parameters, each separated by a single space.
caller
Indicates where the call to the statement or function is: Main block, SYSTEM-TRIGGER, or the name of an internal procedure, function, or method.
source
Indicates the name of the procedure or class containing the caller.
@ line-number
Indicates the line number at which the procedure routine-name is executed by the caller routine. When implicitly invoking the constructor of the super class, this is the string IMPLICIT.
For example:
4GLTrace Run myproc in myproc2.p "my parameters" [init - foo.p @ 10]
The following example shows ABL trace logging for classes:
4GLTrace New temp [Main Block - foo.p @ 10]
4GLTrace Super tempbase [temp - temp @ 5]
4GLTrace Invoke bar in temp "3" [Main Block - foo.p @ 11]
4GLTrace Delete temp [Main Block - foo.p @12]
The general format for ABL trace log return messages is:

Syntax

Return from routine-name "output-param" [program-name][STOP | ERROR]
routine-name
Name of internal procedure, function, method, user-interface trigger, PUBLISH statement, or Main Block.
output-param
List of OUTPUT, INPUT-OUTPUT, and RETURN parameters.
program-name
Name of the program containing the called procedure.
For example:
4GLTrace Return from myproc "my parameters" [myproc2.p]
The return message includes the STOP or ERROR tag in cases where one of those conditions is raised during execution.