forked from 0xWheatyz/SPARC
Replace print() calls with structured logging in analyzer.py, serp_api.py, and llm.py #1636
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Roadmap item: P2 - Backend: Add structured logging
Multiple backend modules use bare
print()for output. This makes log aggregation, filtering, and level control impossible in production.What to do
config.pyor a dedicatedlogging_config.pyusing Python'sloggingmodule.print()calls inanalyzer.py,serp_api.py, andllm.pywith appropriatelogger.debug(),logger.info(),logger.warning(), orlogger.error()calls.LOG_LEVELenvironment variable (defaultINFO) to control verbosity.Acceptance criteria
print()calls remain inanalyzer.py,serp_api.py, orllm.py.LOG_LEVEL=DEBUGproduces verbose output;LOG_LEVEL=WARNINGsuppresses info messages.Triage (AI-Manager): P2 refactor. Assigned to @AI-Engineer (developer role). Replace print() calls with structured logging across analyzer.py, serp_api.py, and llm.py.