diff --git a/lib/bootstrap.dart b/lib/bootstrap.dart index c9abc2fb..a02ea5e0 100644 --- a/lib/bootstrap.dart +++ b/lib/bootstrap.dart @@ -63,7 +63,7 @@ Future lazyBootstrap( ); final enableAnalytics = - await container.read(analyticsControllerProvider.future); + true || await container.read(analyticsControllerProvider.future); if (enableAnalytics) { await _init( "analytics", @@ -178,6 +178,7 @@ Future _init( Future Function() initializer, { int? timeout, }) async { + Logger.bootstrap.warning("$name starting seconds"); final stopWatch = Stopwatch()..start(); Logger.bootstrap.info("initializing [$name]"); Future func() => timeout != null @@ -187,13 +188,20 @@ Future _init( final result = await func(); Logger.bootstrap .debug("[$name] initialized in ${stopWatch.elapsedMilliseconds}ms"); + + Logger.bootstrap.warning("$name done successfully waiting 2 seconds"); + await Future.delayed(Duration(seconds: 2)); return result; } catch (e, stackTrace) { Logger.bootstrap.error("[$name] error initializing", e, stackTrace); + Logger.bootstrap.warning("$name done with error waiting 2 seconds"); + await Future.delayed(Duration(seconds: 2)); rethrow; } finally { stopWatch.stop(); } + Logger.bootstrap.warning("$name done with unknown state waiting 2 seconds"); + await Future.delayed(Duration(seconds: 2)); } Future _safeInit(