File / lines: All src/gmaps_scraper/*.py target modules
Problem: None of scraper.py, place_scraper.py, llm.py, or debug_dump.py import or use the logging module. Errors are either raised, stored in diagnostics, or swallowed. Operators cannot observe mode selection, fallback decisions, retry attempts, consent handling, swallowed HTTP/LLM errors, or timeout budget usage.
Suggested fix:
- Add module-level loggers (e.g.,
logger = logging.getLogger("gmaps_scraper.scraper")).
- Emit
INFO for mode selection and fallback, WARNING for swallowed transient errors and retries, and ERROR for unrecoverable failures.
- Include
source_url, resolved_url, and attempt counters in log messages.
- Keep log messages off the default stdout JSON output (write to stderr or use Python logging defaults).
Difficulty: medium
Impact: High — dramatically improves incident response and operator observability.
File / lines: All
src/gmaps_scraper/*.pytarget modulesProblem: None of
scraper.py,place_scraper.py,llm.py, ordebug_dump.pyimport or use theloggingmodule. Errors are either raised, stored in diagnostics, or swallowed. Operators cannot observe mode selection, fallback decisions, retry attempts, consent handling, swallowed HTTP/LLM errors, or timeout budget usage.Suggested fix:
logger = logging.getLogger("gmaps_scraper.scraper")).INFOfor mode selection and fallback,WARNINGfor swallowed transient errors and retries, andERRORfor unrecoverable failures.source_url,resolved_url, and attempt counters in log messages.Difficulty: medium
Impact: High — dramatically improves incident response and operator observability.