ABL transaction logging
- Last Updated: March 30, 2020
- 2 minute read
- OpenEdge
- Version 12.2
- Documentation
ABL transaction logging
Specifying the ABL transaction (4GLTrans)
log entry type turns on logging of transactions and subtransactions
in ABL procedures. ABL transaction logging logs a message whenever
a transaction or subtransaction begins or ends, or when a transaction
is undone. Logging ABL transaction activity is useful in identifying transaction
processing or scoping errors in your application.
The 4GLTrans log entry type provides information at
the following logging levels:
- Level 2 (Basic) — Logs messages when a transaction begins or ends, or when a transaction is undone
- Level 3 (Verbose) — Logs messages when a transaction or subtransaction begins or ends, or when a transaction or subtransaction is undone
The format for ABL transaction log messages is:
Syntax
|
- BEGIN
- Indicates the beginning of a transaction or subtransaction block.
- END
- Indicates the end of a transaction or subtransaction block, where any changes made during the transaction or subtransaction were committed.
- UNDO
- Indicates the end of a transaction or subtransaction block, where any changes made during the transaction or subtransaction were undone (rolled back).
- SUB-TRANS
- Indicates the log entry is for a subtransaction (occurring within the scope of the currently active transaction).
- TRANS
- Indicates the log entry is for a transaction.
- trans-id
- A unique transaction identifier, which lets you locate the matching
BEGINandENDmessages for a single transaction or subtransaction block within a log file. - proc-name
- The name of the procedure in which the transaction or subtransaction occurred.
- @ line-number
- The line number (in the debug listing for the procedure specified in proc-name) at which the transaction began or ended.
The following procedure and log file output excerpts demonstrate transaction logging:
|
The preceding procedure generates the following log file output for transaction logging at level 2 (Basic):
|
And the following log file output for transaction logging at level 3 (Verbose):
|
For more information about the processing of transactions and subtransactions, see the transactions topics in Develop ABL Applications.