onNewLog method

void onNewLog(
  1. BurtLog log
)

Updates deviceSeverity when a new message comes in.

Implementation

void onNewLog(BurtLog log) {
  final oldSeverity = deviceSeverity[log.device];
  if (oldSeverity == null || log.level.isMoreSevereThan(oldSeverity)) {
    deviceSeverity[log.device] = log.level;
    notifyListeners();
  }
}