renderSpan function
Renders a LogSpan tree to a ConsoleMessageBuffer.
Repeatedly calls LogSpan.build until the span returns itself (terminal), then calls LogSpan.render on the terminal span.
Implementation
@experimental
void renderSpan(LogSpan span, ConsoleMessageBuffer buffer) {
// Build until terminal (span returns itself)
var current = span;
var built = current.build();
while (!identical(built, current)) {
current = built;
built = current.build();
}
// Now current is terminal - call render directly
current.render(buffer);
}