From 72f7eeecd242ad620286bd217841d561f017e38a Mon Sep 17 00:00:00 2001 From: Thanh Le Date: Sat, 9 Mar 2024 20:17:43 +0700 Subject: [PATCH] Better logging when saving state --- app/src/main/scala/StateStorage.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/scala/StateStorage.scala b/app/src/main/scala/StateStorage.scala index 4070d90..1c5c594 100644 --- a/app/src/main/scala/StateStorage.scala +++ b/app/src/main/scala/StateStorage.scala @@ -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)