flush method
Manually flushes the log buffer, calling onLogBatch if it's configured.
Implementation
void flush({LogFlushReason reason = LogFlushReason.success}) {
if (_logBuffer.isNotEmpty && _hasNewLogs) {
onLogBatch?.call(List.unmodifiable(_logBuffer), reason);
_logBuffer.clear();
_hasNewLogs = false;
}
}