write method
Consumes event. Must not throw. May be asynchronous internally.
Implementation
@override
void write(LogEvent event) {
if (_closed) return;
final line = formatter.format(event);
_tail = _tail.then((_) async {
try {
await _ensureOpen();
_out?.writeln(line);
} catch (_) {
// Swallowed per LogSink contract.
}
});
}