Add more logs
This commit is contained in:
@@ -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<void> 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<void> lazyBootstrap(WidgetsBinding widgetsBinding) async {
|
||||
Future<void> initAppServices(
|
||||
Result Function<Result>(ProviderListenable<Result>) read,
|
||||
) async {
|
||||
// await read(filesEditorServiceProvider).init();
|
||||
_loggy.debug("initializing app services");
|
||||
await Future.wait(
|
||||
[
|
||||
read(connectivityServiceProvider).init(),
|
||||
|
||||
@@ -37,9 +37,12 @@ class ProfilesRepositoryImpl
|
||||
|
||||
@override
|
||||
Stream<Either<ProfileFailure, Profile?>> 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
|
||||
|
||||
@@ -17,6 +17,7 @@ class UpdateRepositoryImpl
|
||||
TaskEither<UpdateFailure, InstalledVersionInfo> 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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ part 'active_profile_notifier.g.dart';
|
||||
class ActiveProfile extends _$ActiveProfile with AppLogger {
|
||||
@override
|
||||
Stream<Profile?> build() {
|
||||
loggy.debug("watching active profile");
|
||||
return ref
|
||||
.watch(profilesRepositoryProvider)
|
||||
.watchActiveProfile()
|
||||
|
||||
@@ -12,6 +12,7 @@ part 'runtime_details.g.dart';
|
||||
class RuntimeDetailsNotifier extends _$RuntimeDetailsNotifier with AppLogger {
|
||||
@override
|
||||
Future<RuntimeDetails> build() async {
|
||||
loggy.debug("initializing");
|
||||
final appVersion = await ref
|
||||
.watch(updateRepositoryProvider)
|
||||
.getCurrentVersion()
|
||||
|
||||
@@ -14,6 +14,7 @@ class DeepLinkService extends _$DeepLinkService
|
||||
@override
|
||||
Future<NewProfileLink?> build() async {
|
||||
if (Platform.isLinux) return null;
|
||||
loggy.debug("initializing");
|
||||
for (final protocol in _protocols) {
|
||||
await protocolHandler.register(protocol);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user