Skip to content

Commit

Permalink
Better logging when saving state
Browse files Browse the repository at this point in the history
  • Loading branch information
lenguyenthanh committed Mar 9, 2024
1 parent 6b776ad commit 72f7eee
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/src/main/scala/StateStorage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ object StateStorage:
Logger[IO].error(e)(s"Failed to read state from $path") *> IO.pure(AppState.empty)

def save(state: AppState): IO[Unit] =
Logger[IO].info(s"Saving state to $path") *>
Logger[IO].info(state.toString) *>
Logger[IO].info(s"Saving ${state.size} tasks to $path") *>
fs2.Stream
.emits(state.tasks)
.through(TasksSerializer.serialize)
Expand Down

0 comments on commit 72f7eee

Please sign in to comment.