Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

tweak context setup debug logging

Nick Sweetinga606857b8f64
diff --git a/browser_use/browser/context.py b/browser_use/browser/context.py
index 6c2495982..13a2e70ce 100644
--- a/browser_use/browser/context.py
+++ b/browser_use/browser/context.py
@@ -183,7 +183,6 @@ class BrowserContext:
state: Optional[BrowserContextState] = None,
):
self.context_id = str(uuid.uuid4())
- logger.debug(f'🌎 Initializing new browser context with id: {self.context_id}')
self.config = config or BrowserContextConfig(**browser.config)
self.browser = browser
@@ -257,7 +256,7 @@ class BrowserContext:
@time_execution_async('--initialize_session')
async def _initialize_session(self):
"""Initialize the browser session"""
- logger.debug('🌎 Initializing browser context')
+ logger.debug(f'🌎 Initializing new browser context with id: {self.context_id}')
playwright_browser = await self.browser.get_playwright_browser()
context = await self._create_context(playwright_browser)