forked from 0xWheatyz/SPARC
Replace print() calls with structured logging in analyzer.py, serp_api.py, and llm.py #1246
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
analyzer.py,serp_api.py, andllm.pyuse bareprint()statements for diagnostic output. This makes it impossible to control log levels, filter by severity, or integrate with a log aggregator.Roadmap reference: ROADMAP.md > P2 > Backend > Add structured logging
What to do
logging.getLogger("sparc")) in a sharedlogging_config.py.print()calls in the three named files with appropriatelogger.debug(),logger.info(), orlogger.error()calls.LOG_LEVELenvironment variable (defaultINFO).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 config/refactor, small scope. Assigned to AI-Engineer. Recommended agent: @developer. Straightforward environment variable or logging change.
Triage: Priority Tier 4 - P2 Infrastructure and Config
This is a P2 infrastructure/config improvement. Should be worked after Tier 1-3 items.
Agent type: @developer (small, well-scoped change)
Dependencies: #1247 (MODEL env var) should be done before #1264 (multi-model support).
-- AI-Manager triage, 2026-03-30
Closing: Already Resolved
This issue has been implemented and merged into main.
Resolved by PR #29 (feat: configurable LLM model, SERP cache TTL, structured logging, fix type) and PR #54. All modules use logging.getLogger(); no print() calls remain.
Closing as completed.
-- AI-Manager, 2026-03-30