aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-06-19 11:27:13 +0300
committerGravatar Vitaly Takmazov2019-06-19 11:27:13 +0300
commitebfe5808daf09644167dc6c10e37e5001453f3be (patch)
treed0977e1de2bf4febe2d2e4c6f5417ad614851699 /src
parent09f17af978ecc5556077d76b327eda24f5cc00b6 (diff)
Telegram: webhook logging
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/juick/server/ServerManager.java1
-rw-r--r--src/main/java/com/juick/server/TelegramBotManager.java1
-rw-r--r--src/main/java/com/juick/server/api/webhooks/TelegramWebhook.java4
3 files changed, 2 insertions, 4 deletions
diff --git a/src/main/java/com/juick/server/ServerManager.java b/src/main/java/com/juick/server/ServerManager.java
index 0963f9b8..d3d17c80 100644
--- a/src/main/java/com/juick/server/ServerManager.java
+++ b/src/main/java/com/juick/server/ServerManager.java
@@ -16,7 +16,6 @@
*/
package com.juick.server;
-import com.fasterxml.jackson.databind.ObjectMapper;
import com.juick.Message;
import com.juick.User;
import com.juick.model.AnonymousUser;
diff --git a/src/main/java/com/juick/server/TelegramBotManager.java b/src/main/java/com/juick/server/TelegramBotManager.java
index d5d21c6e..0dc8b13d 100644
--- a/src/main/java/com/juick/server/TelegramBotManager.java
+++ b/src/main/java/com/juick/server/TelegramBotManager.java
@@ -125,7 +125,6 @@ public class TelegramBotManager implements NotificationListener {
}
public void processUpdate(Update update) {
- logger.debug("Update: {}", update);
Message message = update.message();
if (update.message() == null) {
message = update.editedMessage();
diff --git a/src/main/java/com/juick/server/api/webhooks/TelegramWebhook.java b/src/main/java/com/juick/server/api/webhooks/TelegramWebhook.java
index 7a5cebda..3301d60a 100644
--- a/src/main/java/com/juick/server/api/webhooks/TelegramWebhook.java
+++ b/src/main/java/com/juick/server/api/webhooks/TelegramWebhook.java
@@ -42,7 +42,7 @@ import java.nio.charset.StandardCharsets;
@RestController
@ConditionalOnProperty({"telegram_token"})
public class TelegramWebhook {
- private static final Logger logger = LoggerFactory.getLogger(TelegramWebhook.class);
+ private static final Logger logger = LoggerFactory.getLogger("Telegram");
@Inject
private TelegramBotManager telegramBotManager;
@@ -50,7 +50,7 @@ public class TelegramWebhook {
@ResponseStatus(value = HttpStatus.OK)
public void processUpdate(InputStream body) throws Exception {
String data = IOUtils.toString(body, StandardCharsets.UTF_8);
- logger.info("Telegram update: {}", data);
+ logger.debug("Telegram update: {}", data);
Update update = BotUtils.parseUpdate(data);
telegramBotManager.processUpdate(update);
}