diff --git a/lib/data/repository/core_facade_impl.dart b/lib/data/repository/core_facade_impl.dart index 7600957b..5c83f87d 100644 --- a/lib/data/repository/core_facade_impl.dart +++ b/lib/data/repository/core_facade_impl.dart @@ -137,7 +137,7 @@ class CoreFacadeImpl with ExceptionHandler, InfraLogger implements CoreFacade { }).toList(); }).handleExceptions( (error, stackTrace) { - loggy.warning("error watching outbounds", error, stackTrace); + loggy.error("error watching outbounds", error, stackTrace); return CoreServiceFailure.unexpected(error, stackTrace); }, ); diff --git a/lib/data/repository/profiles_repository_impl.dart b/lib/data/repository/profiles_repository_impl.dart index afc14ae0..cc05cd30 100644 --- a/lib/data/repository/profiles_repository_impl.dart +++ b/lib/data/repository/profiles_repository_impl.dart @@ -40,7 +40,7 @@ class ProfilesRepositoryImpl Stream> watchActiveProfile() { return profilesDao.watchActiveProfile().handleExceptions( (error, stackTrace) { - loggy.warning("error watching active profile", error, stackTrace); + loggy.error("error watching active profile", error, stackTrace); return ProfileUnexpectedFailure(error, stackTrace); }, ); diff --git a/lib/features/about/view/about_page.dart b/lib/features/about/view/about_page.dart index d7fc055d..036abdc7 100644 --- a/lib/features/about/view/about_page.dart +++ b/lib/features/about/view/about_page.dart @@ -109,15 +109,16 @@ class AboutPage extends HookConsumerWidget { .check(); }, ), - ListTile( - title: Text(t.settings.general.openWorkingDir), - trailing: const Icon(Icons.arrow_outward_outlined), - onTap: () async { - final path = - ref.read(filesEditorServiceProvider).workingDir.uri; - await UriUtils.tryLaunch(path); - }, - ), + if (PlatformUtils.isDesktop) + ListTile( + title: Text(t.settings.general.openWorkingDir), + trailing: const Icon(Icons.arrow_outward_outlined), + onTap: () async { + final path = + ref.read(filesEditorServiceProvider).workingDir.uri; + await UriUtils.tryLaunch(path); + }, + ), ], ), ), diff --git a/lib/features/intro/view/intro_page.dart b/lib/features/intro/view/intro_page.dart index 1ded6d56..54204917 100644 --- a/lib/features/intro/view/intro_page.dart +++ b/lib/features/intro/view/intro_page.dart @@ -73,7 +73,7 @@ class IntroPage extends HookConsumerWidget with PresLogger { try { await Sentry.close(); } catch (error, stackTrace) { - loggy.warning( + loggy.error( "could not disable analytics", error, stackTrace, diff --git a/lib/features/proxies/notifier/proxies_notifier.dart b/lib/features/proxies/notifier/proxies_notifier.dart index abbd8912..e7904397 100644 --- a/lib/features/proxies/notifier/proxies_notifier.dart +++ b/lib/features/proxies/notifier/proxies_notifier.dart @@ -123,7 +123,7 @@ class ProxiesNotifier extends _$ProxiesNotifier with AppLogger { loggy.debug("testing group: [$groupTag]"); if (state case AsyncData()) { await ref.read(coreFacadeProvider).urlTest(groupTag).getOrElse((err) { - loggy.warning("error testing group", err); + loggy.error("error testing group", err); throw err; }).run(); } diff --git a/lib/features/settings/view/per_app_proxy_page.dart b/lib/features/settings/view/per_app_proxy_page.dart index afcebe82..18fc3ef0 100644 --- a/lib/features/settings/view/per_app_proxy_page.dart +++ b/lib/features/settings/view/per_app_proxy_page.dart @@ -26,7 +26,7 @@ Future> installedPackagesInfo( .watch(platformSettingsProvider) .getInstalledPackages() .getOrElse((err) { - _logger.warning("error getting installed packages", err); + _logger.error("error getting installed packages", err); throw err; }).run(); } diff --git a/lib/services/singbox/ffi_singbox_service.dart b/lib/services/singbox/ffi_singbox_service.dart index 21488eee..e2f75d9c 100644 --- a/lib/services/singbox/ffi_singbox_service.dart +++ b/lib/services/singbox/ffi_singbox_service.dart @@ -191,7 +191,7 @@ class FFISingboxService _logger.debug("stopping status command client"); final err = _box.stopCommandClient(1).cast().toDartString(); if (err.isNotEmpty) { - _logger.warning("error stopping status client"); + _logger.error("error stopping status client"); } receiver.close(); _statusStream = null; @@ -200,12 +200,12 @@ class FFISingboxService (event) { if (event case String _) { if (event.startsWith('error:')) { - loggy.warning("[status client] error received: $event"); + loggy.error("[status client] error received: $event"); throw event.replaceFirst('error:', ""); } return event; } - loggy.warning("[status client] unexpected type, msg: $event"); + loggy.error("[status client] unexpected type, msg: $event"); throw "invalid type"; }, ); @@ -215,7 +215,7 @@ class FFISingboxService .cast() .toDartString(); if (err.isNotEmpty) { - loggy.warning("error starting status command: $err"); + loggy.error("error starting status command: $err"); throw err; } @@ -231,7 +231,7 @@ class FFISingboxService _logger.debug("stopping group command client"); final err = _box.stopCommandClient(4).cast().toDartString(); if (err.isNotEmpty) { - _logger.warning("error stopping group client"); + _logger.error("error stopping group client"); } receiver.close(); _groupsStream = null; @@ -240,12 +240,12 @@ class FFISingboxService (event) { if (event case String _) { if (event.startsWith('error:')) { - loggy.warning("[group client] error received: $event"); + loggy.error("[group client] error received: $event"); throw event.replaceFirst('error:', ""); } return event; } - loggy.warning("[group client] unexpected type, msg: $event"); + loggy.error("[group client] unexpected type, msg: $event"); throw "invalid type"; }, ); @@ -255,7 +255,7 @@ class FFISingboxService .cast() .toDartString(); if (err.isNotEmpty) { - loggy.warning("error starting group command: $err"); + loggy.error("error starting group command: $err"); throw err; } diff --git a/lib/services/singbox/mobile_singbox_service.dart b/lib/services/singbox/mobile_singbox_service.dart index a4bc5b91..83d1e1cc 100644 --- a/lib/services/singbox/mobile_singbox_service.dart +++ b/lib/services/singbox/mobile_singbox_service.dart @@ -120,7 +120,7 @@ class MobileSingboxService if (event case String _) { return event; } - loggy.warning("[group client] unexpected type, msg: $event"); + loggy.error("[group client] unexpected type, msg: $event"); throw "invalid type"; }, ); diff --git a/lib/utils/sentry_loggy_integration.dart b/lib/utils/sentry_loggy_integration.dart index e9b20563..5fc05ba3 100644 --- a/lib/utils/sentry_loggy_integration.dart +++ b/lib/utils/sentry_loggy_integration.dart @@ -7,7 +7,7 @@ class SentryLoggyIntegration extends LoggyPrinter implements Integration { SentryLoggyIntegration({ LogLevel minBreadcrumbLevel = LogLevel.info, - LogLevel minEventLevel = LogLevel.warning, + LogLevel minEventLevel = LogLevel.error, }) : _minBreadcrumbLevel = minBreadcrumbLevel, _minEventLevel = minEventLevel; diff --git a/libcore b/libcore index 75e342b6..dced5a30 160000 --- a/libcore +++ b/libcore @@ -1 +1 @@ -Subproject commit 75e342b6bacca604b4cc19b397aa29124e5c2338 +Subproject commit dced5a30d0cf32c5ced6f002f63008f6fe450101