TraceWhen¶
Enables per-record verbose logging for source rows whose named field matches one of a list of values.
TraceWhen is a targeted-debugging rule. When a source row's named field
matches any value in the supplied list, every rule that runs for that row
writes a detailed trace line to the per-table log — even when the global
log level is INFO.
Tracing has a per-row cost only for matching rows; non-matching rows go
through the normal fast path. It is safe to leave a TraceWhen rule in
place during a long run as long as the trigger list is small.
Tracing is automatically suppressed inside recursive additionalQueue
mapping calls to prevent re-entrant logging from corrupting the trace.
Parameters¶
- 1 —
source_fieldMandatory — accepts: field reference (:-notation) -
The source field whose value is matched against the trigger list.
- 2 —
triggersMandatory — accepts: array of values -
Values that activate per-row tracing. Element types must be compatible with
source_field's type.
Requires¶
- The named source field must exist on the source table.
Examples¶
Trace a small set of patient IDs