TuiTrace class final

Lightweight debug tracer for TUI frame rendering and message dispatch.

All methods are static and gated behind enabled, which is resolved once from environment variables. When disabled, all methods are no-ops with negligible overhead.

Constructors

TuiTrace()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

captureDispatchEnabled bool
Whether dispatch capture logging is enabled.
no setter
enabled bool
Whether trace logging is enabled (set via ARTISANAL_TUI_TRACE env var).
no setter

Static Methods

begin(String label, {TraceTag tag = TraceTag.general, String? extra}) TraceSpan
Begins a named timing span.
close() → void
Closes the trace log file.
event(String type, {TraceTag tag = TraceTag.general, Map<String, Object?> fields = const <String, Object?>{}}) → void
Writes a structured trace event payload.
isTagEnabled(TraceTag tag) bool
Whether logs for tag are currently enabled.
log(String message, {TraceTag tag = TraceTag.general}) → void
Writes a timestamped, tagged trace message to the log file.
tryParseEventLine(String line) TraceEventRecord?
Parses one trace line into TraceEventRecord when it contains a structured event emitted by event.