From cd0712a07b6491c1af9da8b7871c4b4eb7dfe119 Mon Sep 17 00:00:00 2001 From: miloszowi Date: Thu, 14 Oct 2021 20:40:35 +0200 Subject: [PATCH] fixed logging twice same action and added group to log message --- src/bot/handler/startHandler.py | 1 - src/logger.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bot/handler/startHandler.py b/src/bot/handler/startHandler.py index 46e0427..be4b323 100644 --- a/src/bot/handler/startHandler.py +++ b/src/bot/handler/startHandler.py @@ -30,7 +30,6 @@ class StartHandler(AbstractHandler): ) Replier.html(update, start_text, markup) - Logger.action(self.inbound, self.action) def is_group_specific(self) -> bool: return False diff --git a/src/logger.py b/src/logger.py index 57a9c9a..0a19e01 100644 --- a/src/logger.py +++ b/src/logger.py @@ -58,4 +58,4 @@ class Logger: @staticmethod def action(inbound: InboundMessage, action: str) -> None: - Logger.info(f'User {inbound.username}({inbound.user_id}) called {action.upper()} for {inbound.chat_id}') + Logger.info(f'User {inbound.username}({inbound.user_id}) called {action.upper()} for {inbound.chat_id}({inbound.group_name})')