unclecode / crawl4ai

🔥🕷️ Crawl4AI: Open-source LLM Friendly Web Crawler & Scrapper
Apache License 2.0
16.58k stars 1.23k forks source link

verbose=False doesn't remove logging? #264

Closed vincent0426 closed 5 days ago

vincent0426 commented 1 week ago

Could we disable these logging while verbose=False? https://github.com/unclecode/crawl4ai/blob/38044d4afe16b48783457e5ec8538e0a7592e16b/crawl4ai/async_webcrawler.py#L50 https://github.com/unclecode/crawl4ai/blob/38044d4afe16b48783457e5ec8538e0a7592e16b/crawl4ai/async_webcrawler.py#L142

Thanks!

async with AsyncWebCrawler(verbose=False) as crawler:
    result = await crawler.arun(
        url="dummy_url"
    )
    print("Result: ", result)

output: [LOG] 🚀 Crawl4AI 0.3.731 [LOG] 🚀 Content extracted for dummy_url, success: True, time taken: 0.02 seconds [LOG] 🚀 Extraction done for dummy_url, time taken: 0.02 seconds.

unclecode commented 5 days ago

@vincent0426 Thanks for the suggestion, and actually in the new version we have a very advanced, much better logging manager instead of the print; we have a logger class which saves the logs in a file, and if you set verbosity to false, all these logs, including the one that you mentioned, will be gone, so please pull the new version 0.3.74 by today or tomorrow.