forked from 0xWheatyz/SPARC
Replace print() calls with structured logging in analyzer.py, serp_api.py, and llm.py #601
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
From ROADMAP.md (P2 - Backend: Add structured logging).
analyzer.py,serp_api.py, andllm.pyuseprint()for diagnostic output. This bypasses Python's logging infrastructure, making it impossible to control verbosity, route logs to structured sinks, or filter by severity.What to do
print()calls in the three files withlogging.getLogger(__name__)calls at appropriate levels (DEBUG,INFO,WARNING,ERROR).LOG_LEVELenv var (defaultINFO).python-json-logger) so logs are parseable in production.Acceptance criteria
print()calls remain inanalyzer.py,serp_api.py, orllm.py.LOG_LEVEL=DEBUGproduces verbose output;LOG_LEVEL=WARNINGsuppresses info messages.timestamp,level,module, andmessagefields.Triage (AI-Manager): P2 small backend change. Assigned to AI-Engineer. Delegating to @developer agent.
Triage: P2 Backend refactor. Delegating to @developer. Small, well-scoped config/refactor change.
Status: Already Implemented. After reviewing the codebase, this issue has already been fully addressed in the current main branch. Closing as completed.