From 0e4dcbde22b4a638b55cb37baae9707e9624119b Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 26 Jul 2023 19:01:45 +0000 Subject: [PATCH 1/2] Update dependency logger to v2 --- pubspec.lock | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 57600a7..e86bed7 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -433,10 +433,10 @@ packages: dependency: "direct main" description: name: logger - sha256: "7ad7215c15420a102ec687bb320a7312afd449bac63bfb1c60d9787c27b9767f" + sha256: "66cb048220ca51cf9011da69fa581e4ee2bed4be6e82870d9e9baae75739da49" url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "2.0.1" logging: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 7536c42..09b8aa1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -26,7 +26,7 @@ dependencies: provider: 6.0.5 stacked: 3.4.1 get_it: 7.6.0 - logger: 1.4.0 + logger: 2.0.1 shared_preferences: 2.2.0 http: 1.1.0 validators: 3.0.0 From fc0fe31b7019a12d8e87b50535217bf5507bdb3f Mon Sep 17 00:00:00 2001 From: Varakh Date: Wed, 26 Jul 2023 22:42:51 +0200 Subject: [PATCH 2/2] Fix signature change in upgraded logger #noissue --- lib/core/viewmodels/history_model.dart | 4 ++-- lib/core/viewmodels/login_model.dart | 2 +- lib/core/viewmodels/profile_model.dart | 2 +- lib/core/viewmodels/upload_model.dart | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/core/viewmodels/history_model.dart b/lib/core/viewmodels/history_model.dart index e506db3..07c3f21 100644 --- a/lib/core/viewmodels/history_model.dart +++ b/lib/core/viewmodels/history_model.dart @@ -108,7 +108,7 @@ class HistoryModel extends BaseModel { } else { errorMessage = translate('app.unknown_error'); setStateView(ViewState.idle); - _logger.e('An unknown error occurred', e); + _logger.e('An unknown error occurred', error: e); rethrow; } } @@ -156,7 +156,7 @@ class HistoryModel extends BaseModel { } else { errorMessage = translate('app.unknown_error'); setStateView(ViewState.idle); - _logger.e('An unknown error occurred', e); + _logger.e('An unknown error occurred', error: e); rethrow; } } diff --git a/lib/core/viewmodels/login_model.dart b/lib/core/viewmodels/login_model.dart index 8d62d08..002fd94 100644 --- a/lib/core/viewmodels/login_model.dart +++ b/lib/core/viewmodels/login_model.dart @@ -163,7 +163,7 @@ class LoginModel extends BaseModel { errorMessage = translate('app.unknown_error'); _sessionService.logout(); setStateView(ViewState.idle); - _logger.e('An unknown error occurred', e); + _logger.e('An unknown error occurred', error: e); rethrow; } diff --git a/lib/core/viewmodels/profile_model.dart b/lib/core/viewmodels/profile_model.dart index 3d5362c..ae83939 100644 --- a/lib/core/viewmodels/profile_model.dart +++ b/lib/core/viewmodels/profile_model.dart @@ -77,7 +77,7 @@ class ProfileModel extends BaseModel { setStateBoolValue(_configurationButtonLoading, false); _sessionService.logout(); setStateBoolValue(_configurationButtonLoading, false); - _logger.e('An unknown error occurred', e); + _logger.e('An unknown error occurred', error: e); rethrow; } } diff --git a/lib/core/viewmodels/upload_model.dart b/lib/core/viewmodels/upload_model.dart index 71e43ed..ae09293 100644 --- a/lib/core/viewmodels/upload_model.dart +++ b/lib/core/viewmodels/upload_model.dart @@ -152,9 +152,9 @@ class UploadModel extends BaseModel { )) ?.files; } on PlatformException catch (e) { - _logger.e('Unsupported operation', e); + _logger.e('Unsupported operation', error: e); } catch (ex) { - _logger.e('An unknown error occurred', ex); + _logger.e('An unknown error occurred', error: ex); } loadingPath = false; @@ -238,7 +238,7 @@ class UploadModel extends BaseModel { errorMessage = translate('app.unknown_error'); setStateMessage(null); setStateView(ViewState.idle); - _logger.e('An unknown error occurred', e); + _logger.e('An unknown error occurred', error: e); rethrow; } }