Skip to content

Commit

Permalink
Merge pull request #244 from ArinFaraj/master
Browse files Browse the repository at this point in the history
fix(riverpod_logger): duplicated state logs fixes #241
  • Loading branch information
Frezyx authored Jul 18, 2024
2 parents 0b926e3 + 08b9a92 commit 5911ccd
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions packages/talker_riverpod_logger/lib/riverpod_logs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ class RiverpodAddLog extends TalkerLog {
required this.settings,
}) : super(
_defaultMessage(
provider: provider,
suffix: 'initialized',
) +
(settings.printStateFullData ? '\nINITIAL state: \n$value' : ''),
provider: provider,
suffix: 'initialized',
),
);

final ProviderBase<Object?> provider;
Expand Down Expand Up @@ -59,12 +58,9 @@ class RiverpodUpdateLog extends TalkerLog {
required this.settings,
}) : super(
_defaultMessage(
provider: provider,
suffix: 'updated',
) +
(settings.printStateFullData
? '\nPREVIOUS state:\n$previousValue\nNEW state:\n$newValue'
: ''),
provider: provider,
suffix: 'updated',
),
);

final ProviderBase<Object?> provider;
Expand Down Expand Up @@ -136,12 +132,9 @@ class RiverpodFailLog extends TalkerLog {
required this.settings,
}) : super(
_defaultMessage(
provider: provider,
suffix: 'failed',
) +
(settings.printFailFullData
? '\nERROR:\n$providerError\nSTACK TRACE:\n$providerStackTrace'
: ''),
provider: provider,
suffix: 'failed',
),
);

final ProviderBase<Object?> provider;
Expand Down

0 comments on commit 5911ccd

Please sign in to comment.