Skip to content

Commit c51f00a

Browse files
committed
Improving logging messages
1 parent 6fe6cdf commit c51f00a

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tg_bot/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ def process_update(self, update):
638638
return
639639

640640
now = datetime.datetime.utcnow()
641-
self.logger.debug(update)
641+
LOGGER.info(update)
642642
cnt = CHATS_CNT.get(update.effective_chat.id, 0)
643643

644644
t = CHATS_TIME.get(update.effective_chat.id, datetime.datetime(1970, 1, 1))

tg_bot/modules/welcome.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from telegram.utils.helpers import mention_markdown, mention_html, escape_markdown
1111

1212
import tg_bot.modules.sql.welcome_sql as sql
13+
from tg_bot import BAN_STICKER
1314
from tg_bot import dispatcher, OWNER_ID, LOGGER
1415
from tg_bot.modules.helper_funcs.chat_status import user_admin
1516
from tg_bot.modules.helper_funcs.misc import build_keyboard, revert_buttons
@@ -19,7 +20,6 @@
1920
escape_invalid_curly_brackets,
2021
)
2122
from tg_bot.modules.log_channel import loggable
22-
from tg_bot import BAN_STICKER
2323

2424
VALID_WELCOME_FORMATTERS = [
2525
"first",
@@ -96,8 +96,8 @@ def send(update, message, keyboard, backup_message):
9696
),
9797
parse_mode=ParseMode.MARKDOWN,
9898
)
99-
LOGGER.warning(message)
100-
LOGGER.warning(keyboard)
99+
LOGGER.warning(f"Message obj warn: {message}")
100+
LOGGER.warning(f"Keyword warn: {keyboard}")
101101
LOGGER.exception("Impossibile parsarlo! Ci sono degli url non validi.")
102102
else:
103103
msg = update.effective_message.reply_text(

0 commit comments

Comments
 (0)