From a0ec94bb16366b29e9c0bdabc8e3adf4e37b3727 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 05:12:25 +0000 Subject: [PATCH 1/3] fix(CODEWIKI-006): 2 review findings across 2 files --- codewiki/cli/adapters/doc_generator.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/codewiki/cli/adapters/doc_generator.py b/codewiki/cli/adapters/doc_generator.py index 93123d19..fa16b501 100644 --- a/codewiki/cli/adapters/doc_generator.py +++ b/codewiki/cli/adapters/doc_generator.py @@ -13,12 +13,6 @@ import logging import sys -# Suppress verbose third-party library logs (OpenAI, Anthropic, httpx) -logging.getLogger("httpx").setLevel(logging.WARNING) -logging.getLogger("openai").setLevel(logging.WARNING) -logging.getLogger("openai._base_client").setLevel(logging.WARNING) -logging.getLogger("anthropic").setLevel(logging.WARNING) - from codewiki.cli.utils.progress import ProgressTracker from codewiki.cli.models.job import DocumentationJob, LLMConfig from codewiki.cli.utils.errors import APIError From 4f3263d4646c732abc520688d9f1b3fef5301401 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 05:12:27 +0000 Subject: [PATCH 2/3] fix(CODEWIKI-006): 2 review findings across 2 files --- codewiki/cli/commands/generate.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/codewiki/cli/commands/generate.py b/codewiki/cli/commands/generate.py index 2cf8e573..ba469ae7 100644 --- a/codewiki/cli/commands/generate.py +++ b/codewiki/cli/commands/generate.py @@ -216,12 +216,6 @@ def generate_command( logger = create_logger(verbose=verbose) start_time = time.time() - # Suppress verbose third-party library logs - logging.getLogger("httpx").setLevel(logging.WARNING) - logging.getLogger("openai").setLevel(logging.WARNING) - logging.getLogger("openai._base_client").setLevel(logging.WARNING) - logging.getLogger("anthropic").setLevel(logging.WARNING) - try: # Pre-generation checks logger.step("Validating configuration...", 1, 4) @@ -553,3 +547,4 @@ def generate_command( except Exception as e: sys.exit(handle_error(e, verbose=verbose)) + From 8e989c3db5f9729d746e62f77893aafad91f6a8c Mon Sep 17 00:00:00 2001 From: Michael Assraf Date: Mon, 7 Sep 2026 23:01:17 -0400 Subject: [PATCH 3/3] fix: move third-party log suppression into create_logger Deleting the setLevel() calls was right in principle - a module-level side effect that fires on import is invisible from the call site - but it left nothing suppressing them on the CLI path. The identical block in src/be/main.py does not help: that module is not among the 49 reachable from cli/commands/generate.py, so after this branch 'python -m codewiki generate' logs one httpx INFO line per LLM request, and the doc pipeline runs it with --verbose. Reintroduce the suppression as quiet_third_party_loggers(), called from create_logger(), which generate_command already invokes before any generation work. Same effect, at an explicit call site instead of an import side effect. Co-Authored-By: Claude Opus 5 --- codewiki/cli/utils/logging.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/codewiki/cli/utils/logging.py b/codewiki/cli/utils/logging.py index 80863404..c882407f 100644 --- a/codewiki/cli/utils/logging.py +++ b/codewiki/cli/utils/logging.py @@ -2,6 +2,7 @@ Logging utilities for CLI with colored output and progress tracking. """ +import logging import sys from datetime import datetime from typing import Optional @@ -71,6 +72,26 @@ def elapsed_time(self) -> str: return f"{seconds}s" +# Third-party HTTP/SDK loggers emit one INFO line per request. Across a +# documentation run that is thousands of lines of noise in CI, so they are +# capped at WARNING. Applied from create_logger() rather than at import time: +# a setLevel() side effect that fires merely because a module was imported is +# invisible to anyone reading the call site, and fires even for importers that +# never wanted it. +_NOISY_THIRD_PARTY_LOGGERS = ( + "httpx", + "openai", + "openai._base_client", + "anthropic", +) + + +def quiet_third_party_loggers(level: int = logging.WARNING) -> None: + """Cap the noisiest third-party loggers so CLI output stays readable.""" + for name in _NOISY_THIRD_PARTY_LOGGERS: + logging.getLogger(name).setLevel(level) + + def create_logger(verbose: bool = False) -> CLILogger: """ Create and return a CLI logger. @@ -81,5 +102,6 @@ def create_logger(verbose: bool = False) -> CLILogger: Returns: Configured CLILogger instance """ + quiet_third_party_loggers() return CLILogger(verbose=verbose)