addLogEntry method

void addLogEntry(
  1. MCPLogEntry entry
)

Adds a log entry to the history

Implementation

void addLogEntry(MCPLogEntry entry) {
  _logHistory.insert(0, entry);

  // Maintain max history size
  if (_logHistory.length > _maxHistorySize) {
    _logHistory.removeLast();
  }

  // Emit to stream
  _logStreamController.add(entry);
}