From 96ce14e38ffa151f4ba0324cf078e110613050fb Mon Sep 17 00:00:00 2001 From: Max Duval Date: Fri, 5 Apr 2024 11:36:24 +0100 Subject: [PATCH] refactor(DeeplyReadAgent): better logging (#27019) The current formatting of keys is hard to parse, and it is helpful to know the size of the new map --- common/app/agents/DeeplyReadAgent.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/app/agents/DeeplyReadAgent.scala b/common/app/agents/DeeplyReadAgent.scala index 5958975e65e4..453edcf11200 100644 --- a/common/app/agents/DeeplyReadAgent.scala +++ b/common/app/agents/DeeplyReadAgent.scala @@ -83,7 +83,9 @@ class DeeplyReadAgent(contentApiClient: ContentApiClient, ophanApi: OphanApi) ex } yield log.info(s"Deeply Read in ${edition.displayName}, ${list.size} items: ${list.map(_.url).toString()}") val mapWithTenItems = map.filter { case (_, list) => list.size == 10 } - log.info(s"Updating the followings keys: ${mapWithTenItems.keys.toString()}") + log.info( + s"Updating the following ${mapWithTenItems.size} editions: ${mapWithTenItems.keys.map(_.id).toList.sorted.toString()}", + ) deeplyReadItems.alter(deeplyReadItems.get() ++ mapWithTenItems) })