diff --git a/lib/bootstrap.dart b/lib/bootstrap.dart index c6fda515..3d816f9a 100644 --- a/lib/bootstrap.dart +++ b/lib/bootstrap.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_native_splash/flutter_native_splash.dart'; @@ -49,6 +50,11 @@ Future lazyBootstrap(WidgetsBinding widgetsBinding) async { ), ); + _loggy.debug( + "os: ${Platform.operatingSystem}(${Platform.operatingSystemVersion})", + ); + _loggy.debug("basic setup took [${_stopWatch.elapsedMilliseconds}]ms"); + final silentStart = container.read(prefsControllerProvider).general.silentStart; if (silentStart) { @@ -76,7 +82,7 @@ Future lazyBootstrap(WidgetsBinding widgetsBinding) async { Future initAppServices( Result Function(ProviderListenable) read, ) async { - // await read(filesEditorServiceProvider).init(); + _loggy.debug("initializing app services"); await Future.wait( [ read(connectivityServiceProvider).init(), diff --git a/lib/data/repository/profiles_repository_impl.dart b/lib/data/repository/profiles_repository_impl.dart index 5bb9a554..4916c905 100644 --- a/lib/data/repository/profiles_repository_impl.dart +++ b/lib/data/repository/profiles_repository_impl.dart @@ -37,9 +37,12 @@ class ProfilesRepositoryImpl @override Stream> watchActiveProfile() { - return profilesDao - .watchActiveProfile() - .handleExceptions(ProfileUnexpectedFailure.new); + return profilesDao.watchActiveProfile().handleExceptions( + (error, stackTrace) { + loggy.warning("error watching active profile", error, stackTrace); + return ProfileUnexpectedFailure(error, stackTrace); + }, + ); } @override diff --git a/lib/data/repository/update_repository_impl.dart b/lib/data/repository/update_repository_impl.dart index b6830fd4..490c9d7c 100644 --- a/lib/data/repository/update_repository_impl.dart +++ b/lib/data/repository/update_repository_impl.dart @@ -17,6 +17,7 @@ class UpdateRepositoryImpl TaskEither getCurrentVersion() { return exceptionHandler( () async { + loggy.debug("getting current app version"); final packageInfo = await PackageInfo.fromPlatform(); return right( InstalledVersionInfo( @@ -26,7 +27,10 @@ class UpdateRepositoryImpl ), ); }, - UpdateFailure.unexpected, + (error, stackTrace) { + loggy.warning("error getting current app version", error, stackTrace); + return UpdateFailure.unexpected(error, stackTrace); + }, ); } diff --git a/lib/features/common/active_profile/active_profile_notifier.dart b/lib/features/common/active_profile/active_profile_notifier.dart index 0c232bc7..3b8dcd3e 100644 --- a/lib/features/common/active_profile/active_profile_notifier.dart +++ b/lib/features/common/active_profile/active_profile_notifier.dart @@ -10,6 +10,7 @@ part 'active_profile_notifier.g.dart'; class ActiveProfile extends _$ActiveProfile with AppLogger { @override Stream build() { + loggy.debug("watching active profile"); return ref .watch(profilesRepositoryProvider) .watchActiveProfile() diff --git a/lib/features/common/runtime_details.dart b/lib/features/common/runtime_details.dart index bd61d380..84a9e642 100644 --- a/lib/features/common/runtime_details.dart +++ b/lib/features/common/runtime_details.dart @@ -12,6 +12,7 @@ part 'runtime_details.g.dart'; class RuntimeDetailsNotifier extends _$RuntimeDetailsNotifier with AppLogger { @override Future build() async { + loggy.debug("initializing"); final appVersion = await ref .watch(updateRepositoryProvider) .getCurrentVersion() diff --git a/lib/services/deep_link_service.dart b/lib/services/deep_link_service.dart index 13baba9f..ad1dc911 100644 --- a/lib/services/deep_link_service.dart +++ b/lib/services/deep_link_service.dart @@ -14,6 +14,7 @@ class DeepLinkService extends _$DeepLinkService @override Future build() async { if (Platform.isLinux) return null; + loggy.debug("initializing"); for (final protocol in _protocols) { await protocolHandler.register(protocol); }