Try OpenEdge Now
skip to main content
DataServer for Microsoft SQL Server
Connecting the DataServer : Connecting a schema holder : Analyzing application execution with Enhanced Logger : Aggregate logging using performance and interface log entry types at run-time
 
Aggregate logging using performance and interface log entry types at run-time
You can diagnose ABL code at run-time using the PERFORMANCE and INTERFACE log entry types. Collecting information with logging level 3 (Verbose) using the log entry type PERFORMANCE is called aggregate logging. Placing the PERFORMANCE log entry type around a section of ABL code helps you measure performance for that particular section of code.
When you have to monitor the performance or interface of a particular section of ABL code, you must use the PERFORMANCE or INTERFACE log entry type respectively and assign it the highest logging level so that detailed logs are logged for that particular section of ABL code. For the rest of ABL code that you do not have to monitor, use the PERFORMANCE or INTERFACE log entry type and assign it a relatively lower logging level. For more information on log entry types and logging levels, see Log entry types and Logging levels.
The following use case shows you how to set the PERFORMANCE log entry type in ABL code for aggregate logging. The log entry type set at run-time through DSLOG-MANAGER overrides any log entry type set at startup or at connection level. For more information on DSLOG-MANAGER, see DSLOG-MANAGER system handle attributes and methods.
Suppose you have an ABL program with the following code for which you want aggregate performance logs for the FOR EACH section of the ABL code and less detailed logs for the rest of the ABL code, then, for the FOR EACH block of the ABL code you use the performance logging level, 3 (Verbose). After the FOR EACH block ends, you lower the logging level to 2 (basic) as you do not need detailed logs for the rest of the ABL code.
...
DSLOG-MANAGER:DB-CONTEXT = 'logical-database-name'.
DSLOG-MANAGER:LOG-ENTRY-TYPES = "PERFORMANCE:3".

FOR EACH mytable.
END.
DSLOG-MANAGER:LOG-ENTRY-TYPES = "PERFORMANCE:2".
...
Note: Dynamic (run-time) logging is enabled only for the server context of the enhanced logger.
Dynamic performance and interface logging does not affect the aggregate performance and interface logging at the session level.