diff options
Diffstat (limited to 'juick-server')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/configuration/EventsConfiguration.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/juick-server/src/main/java/com/juick/server/configuration/EventsConfiguration.java b/juick-server/src/main/java/com/juick/server/configuration/EventsConfiguration.java index 4edc9dde..63c774fa 100644 --- a/juick-server/src/main/java/com/juick/server/configuration/EventsConfiguration.java +++ b/juick-server/src/main/java/com/juick/server/configuration/EventsConfiguration.java @@ -5,6 +5,8 @@ import com.juick.server.XMPPBot; import com.juick.server.component.LikeEvent; import com.juick.server.component.MessageEvent; import com.juick.server.component.SubscribeEvent; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.context.ApplicationListener; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -13,6 +15,7 @@ import javax.inject.Inject; @Configuration public class EventsConfiguration { + private static Logger logger = LoggerFactory.getLogger(EventsConfiguration.class); @Inject private TelegramBotManager telegramBotManager; @Inject @@ -20,6 +23,7 @@ public class EventsConfiguration { @Bean ApplicationListener<MessageEvent> messageListener() { return event -> { + logger.info("MessageEvent: {}", event.getMessage()); telegramBotManager.processMessage(event.getMessage()); bot.processMessage(event.getMessage()); }; @@ -27,12 +31,14 @@ public class EventsConfiguration { @Bean ApplicationListener<LikeEvent> likeListener() { return event -> { + logger.info("LikeEvent: {} -> {}", event.getUser().getName(), event.getMessage()); telegramBotManager.processLike(event.getUser(), event.getMessage()); }; } @Bean ApplicationListener<SubscribeEvent> subscribeListener() { return event -> { + logger.info("SubscribeEvent: {} -> {}", event.getUser().getName(), event.getToUser().getName()); telegramBotManager.processSubscribe(event.getUser(), event.getToUser()); }; } |