diff options
author | Vitaly Takmazov | 2021-10-23 21:42:40 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2021-10-23 21:42:40 +0300 |
commit | 7a790cf66d6fe7dc68bcb96c2e80eeae7e7c6e8f (patch) | |
tree | 41520d89240aeba02044b64cf4103af031971bbf /src | |
parent | 8f96d329454c3343d4177364c12c087bf1147a7d (diff) |
Add logging to top bot
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/juick/TopManager.java | 5 |
1 files changed, 3 insertions, 2 deletions
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<String> 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()); } }); } |