clear() {
    this.logs = [];
    this.listeners.forEach(l => l(this.logs));
  }