install method

  1. @override
void install()
override

Wire the watcher's listening hook (event subscription, override, etc.).

Implementation

@override
void install() {
  if (_sub != null) return; // idempotent
  // Enable hierarchical logging so all loggers funnel through root.
  hierarchicalLoggingEnabled = true;
  Logger.root.level = Level.ALL;
  _sub = Logger.root.onRecord.listen((record) {
    TelescopeStore.recordLog(LogRecordEntry.fromLogRecord(record));
  });
}