Skip to main content

TvxLog

type TvxLog = class(TvxModule);

Example

procedure ScriptEvent(var Value: Variant);
begin
if Action <> nil then
if Action.Log <> nil then
Value := Action.Log.StatusType
else
Value := -1
else
Value := -1;
end;

Usage

TvxLog represents the Velox-provided execution log, including overall and temporary statuses, messages, file/transport events and diagnostic traces.

Acquisition and ownership

The scripting import exposes no constructor. Obtain the current Velox-provided reference through a script-visible module's Log property, commonly Action.Log. Do not create, free or retain it beyond the owning execution.

Additional Technical Info

TvxLog is the mutable log for an action/transport execution. It owns message items, file and transport event records and diagnostic SQL/HTTP/transport traces, while tracking both an overall status type and temporary header/row statuses.

Status model

StatusType uses the registered enum's ordinal order:

OrdinalValueDisplay meaning
0flsNotSetNot set
1flsOKSuccessful
2flsWarningWarning
3flsIssueIssue
4flsDuplicateDuplicate
5flsCancelledCancelled
6flsErrorError
7flsTestTest
8flsHighlightNote/highlight

Normal StatusType assignment only accepts a greater ordinal. This is not a conventional resettable severity ordering: Test/Highlight outrank Error numerically. Error separately makes the internal Boolean Status false; OK makes it true even when the status type cannot downgrade, so those two values can disagree.

HeaderStatusType and RowStatusType mirror successful overall escalation. Their properties read without reset; GetHeaderStatus and GetRowStatus consume/reset the temporary value.

Lifecycle and destructive operations

Reset/initialisation sets overall, header and row status to OK, Boolean Status/Handled true, current identifiers blank and start/end time to now. It frees current messages/file/transport objects and clears diagnostic lists. Clear invokes the full New/Reset path and fires the log-cleared event; it is not a display-only clear.

Messages added through native Info/Warning/Issue/Duplicate/Cancelled/Error paths update status and may show foreground UI. The five generated methods expose status consumption, destructive clear and SQL trace appends; message-creation methods are not part of this class's generated script surface.

Safety and concurrency

  • Status and list operations are mostly unsynchronised; only selected native fields use locks. Do not mutate one Log concurrently.
  • Logs can retain SQL, URIs, payload fragments, filenames and exception details. Never add credentials, personal data or sensitive content unnecessarily.
  • Clearing or forcing status during execution can change later routing, audit, retry, notification and persistence decisions.
  • Log saving and UI/event callbacks can perform database/UI work; do not assume every mutation is isolated or cheap.

Related entries

Created 2026-07-15