mirror of
https://github.com/usestrix/strix.git
synced 2026-09-19 00:01:11 +00:00
cleanup logging in browser_actions (to test)
This commit is contained in:
parent
65fd7168b3
commit
37942d0857
1 changed files with 0 additions and 17 deletions
|
|
@ -120,23 +120,6 @@ async def _run_browser_agent(
|
|||
use_vision=vision,
|
||||
)
|
||||
|
||||
# browseruse's setup_logging() adds a StreamHandler and disables propagation;
|
||||
# undo that so logs flow to our root file handler instead of the console
|
||||
for _name in ("browser_use", "bubus"):
|
||||
_bl = logging.getLogger(_name)
|
||||
_bl.handlers = [
|
||||
h
|
||||
for h in _bl.handlers
|
||||
if not isinstance(h, logging.StreamHandler) or isinstance(h, logging.FileHandler)
|
||||
]
|
||||
_bl.propagate = True
|
||||
|
||||
# cdp_use.client spams "unexpected message" warnings from Chromium; suppress
|
||||
_cdp_client = logging.getLogger("cdp_use.client")
|
||||
_cdp_client.handlers = []
|
||||
_cdp_client.setLevel(logging.ERROR)
|
||||
_cdp_client.propagate = False
|
||||
|
||||
result = await agent.run()
|
||||
|
||||
if hasattr(result, "is_successful") and not result.is_successful():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue