aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/TopManager.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2021-10-23 21:42:40 +0300
committerGravatar Vitaly Takmazov2021-10-23 21:42:40 +0300
commit7a790cf66d6fe7dc68bcb96c2e80eeae7e7c6e8f (patch)
tree41520d89240aeba02044b64cf4103af031971bbf /src/main/java/com/juick/TopManager.java
parent8f96d329454c3343d4177364c12c087bf1147a7d (diff)
Add logging to top bot
Diffstat (limited to 'src/main/java/com/juick/TopManager.java')
-rw-r--r--src/main/java/com/juick/TopManager.java5
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());
}
});
}