install method

  1. @override
void install()

Idempotent across instances: the guard is the container's own 'log' instance, which Magic.flush() drops together with the wrapper.

Implementation

@override
void install() {
  if (!Magic.bound('log')) return;
  final LogManager current = Magic.make<LogManager>('log');
  if (current is _ObservingLogManager) return;
  Magic.app.setInstance('log', _ObservingLogManager(current));
}