Start query information logging on individual queries
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
You can turn on query information logging programmatically for an individual query by doing the following:
- Ensure that the logging level of the
QryInfolog entry type is Basic (level 2). - Set the
BASIC-LOGGINGattribute of the query object handle toTRUEbefore the query starts, as follows:- For a dynamically opened query, this is before the
QUERY-PREPARE()method - For a statically opened query, this is before the
OPEN QUERYstatement
- For a dynamically opened query, this is before the
Note: Since
FOR EACH and static PRESELECT queries
do not have an associated handle, you cannot log them at level 2.If the query has already started, no query information logging occurs.
Upon successful startup, OpenEdge writes a message to the log file noting that it has turned on query information logging for the query; the message includes a Query ID, handle, and query name.
To turn off query information logging for the query, set the BASIC-LOGGING attribute
of the query object handle to FALSE. If you do
this before the query completes, no query statistics are written. OpenEdge writes
a message to the log file noting that it has turned off query information
logging for the query; the message includes a Query ID, handle,
and query name.