Skip to content

Official Crawl4AI Cloud: a hosted web scraping, extraction, and search API for AI agents. Free API key, 1,000 credits a month, no card. Fully open source: this repo is the Apache-2.0 crawler that powers it, and you can self-host it.

fix(logger): default Console width=200 for non-TTY contexts

unclecodec06a3dcf5642
diff --git a/crawl4ai/async_logger.py b/crawl4ai/async_logger.py
index 8edcb24a..a4697315 100644
--- a/crawl4ai/async_logger.py
+++ b/crawl4ai/async_logger.py
@@ -144,7 +144,11 @@ class AsyncLogger(AsyncLoggerBase):
self.verbose = verbose
# Default to stderr so log lines do not corrupt stdout-based protocols
# (e.g. MCP stdio transport, piped shell commands).
- self.console = console if console is not None else Console(stderr=True)
+ # width=200: Rich's default falls back to 80 in non-TTY contexts
+ # (e.g. Docker `docker logs`, CI, captured stdout), which truncates
+ # useful diagnostic lines. TTYs still auto-detect actual terminal
+ # width; this only lifts the non-TTY fallback cap.
+ self.console = console if console is not None else Console(stderr=True, width=200)
# Create log file directory if needed
if log_file: