Skip to content

Commit

Permalink
Merge pull request #16 from lukas-kd/feature/remove_console_writelines
Browse files Browse the repository at this point in the history
replace console-writeLines against logger
  • Loading branch information
Tailslide authored Feb 29, 2024
2 parents a94de57 + 0dc48ed commit 34469c0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Fluxor.Persist/Middleware/PersistMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public override async Task InitializeAsync(IDispatcher dispatcher, IStore store)

await base.InitializeAsync(dispatcher, store);

Console.WriteLine("Restoring state for features");
Logger?.LogDebug("Restoring state for features");
foreach (var feature in Store.Features.Values
.OrderBy(f => f
.GetStateType()
Expand All @@ -80,12 +80,11 @@ public override async Task InitializeAsync(IDispatcher dispatcher, IStore store)
{
if (!Options.ShouldPersistState(feature))
{
Console.WriteLine($"Skipping feature: {feature.GetName()}");
Logger?.LogDebug($"Don't persist {feature.GetName()} state");
continue;
}

Console.WriteLine($"Restoring feature: {feature.GetName()}");
Logger?.LogDebug($"Restoring feature: {feature.GetName()}");
var restoredState = await StoreHandler.GetState(feature);
feature.RestoreState(restoredState);

Expand Down

0 comments on commit 34469c0

Please sign in to comment.