From 7a790cf66d6fe7dc68bcb96c2e80eeae7e7c6e8f Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 23 Oct 2021 21:42:40 +0300 Subject: Add logging to top bot --- src/main/java/com/juick/TopManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/juick/TopManager.java b/src/main/java/com/juick/TopManager.java index c58af428..f910c325 100644 --- a/src/main/java/com/juick/TopManager.java +++ b/src/main/java/com/juick/TopManager.java @@ -17,6 +17,7 @@ package com.juick; +import com.juick.model.CommandResult; import com.juick.model.Message; import com.juick.model.Tag; import com.juick.model.User; @@ -45,8 +46,8 @@ public class TopManager { Message jmsg = messagesService.getMessage(m).orElseThrow(IllegalStateException::new); List tags = jmsg.getTags().stream().map(Tag::getName).map(String::toLowerCase).collect(Collectors.toList()); if (!tags.contains("juick")) { - logger.info("added {} to popular", m); - commandsManager.commandRecommend(serviceUser, null, String.valueOf(m)); + CommandResult result = commandsManager.commandRecommend(serviceUser, null, String.valueOf(m)); + logger.debug("Popular message {}: {}", m, result.getText()); } }); } -- cgit v1.2.3