flush method
void
flush()
Immediately flushes all queued entries to the wrapped printer, ignoring the rate limit. Useful before shutdown or in crash scenarios where you want everything out.
Synchronous: returns as soon as the queue has been pumped into
inner. If inner is async (e.g. a RotatingFilePrinter whose
path hasn't resolved yet) entries are accepted by inner.log
but may not be durable on disk until the wrapped printer's own
close() / flush() resolves. For shutdown durability, call
the wrapped printer's async drain afterward.
Implementation
void flush() {
_drainTimer?.cancel();
_drainTimer = null;
_emitDroppedSummary(consumeBudget: false);
while (_queue.isNotEmpty) {
inner.log(_queue.removeFirst());
}
}