From 0f7414b4da5acdefa0d2378dee4729a3d0682ab9 Mon Sep 17 00:00:00 2001 From: Yuriy Yuriev Date: Tue, 19 May 2026 13:11:45 +0700 Subject: [PATCH] fix logs --- handlers/commands.py | 3 +++ services/browser_service.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/handlers/commands.py b/handlers/commands.py index e767ffb..92700d3 100644 --- a/handlers/commands.py +++ b/handlers/commands.py @@ -2148,6 +2148,9 @@ class BotInterface: if result.success: params.successful_visits += 1 await self.balance_storage.deduct(params.user_id, 1) + logger.info(f"✅ Visit {params.successful_visits}/{max_v}: {params.url[:40]}") + else: + logger.warning(f"❌ Visit failed ({params.total_visits}): {result.error or 'unknown'}") except asyncio.CancelledError: raise except Exception as e: diff --git a/services/browser_service.py b/services/browser_service.py index 24a5e31..73fd6fa 100644 --- a/services/browser_service.py +++ b/services/browser_service.py @@ -244,6 +244,8 @@ class BrowserService: except asyncio.CancelledError: raise except Exception as e: + if not reading_completed: + logger.warning(f"Browse error [{proxy_info}] {url[:50]}: {e}") return VisitResult( url=url, initial_url=initial_url,