forked from 0xWheatyz/SPARC
Replace print() calls with structured logging in analyzer.py, serp_api.py, and llm.py #451
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
print()for output. This means log levels cannot be filtered, log format is inconsistent, and log aggregation tools cannot parse structured fields.What to do
analyzer.py,serp_api.py, andllm.pyusing Pythonlogging.print()calls with appropriate log level calls (logger.debug,logger.info,logger.warning,logger.error).%(asctime)s %(levelname)s %(name)s %(message)s) in the application entry point.LOG_LEVELenvironment variable.Acceptance criteria
print()calls remain inanalyzer.py,serp_api.py, orllm.py.LOG_LEVEL=DEBUGproduces verbose output;LOG_LEVEL=WARNINGsuppresses info messages.Reference: ROADMAP.md - P2 Backend
[Repo Manager Triage] P2 Backend issue - small complexity. Assigned to @AI-Engineer. Delegating to @developer agent. Will be worked after P1 issues are complete.
[Repo Manager] Closing as already implemented.
Already implemented: No
print()calls remain inanalyzer.py,serp_api.py, orllm.py. All uselogging.getLogger(__name__).config.py:13-17configures log format andLOG_LEVELenv var.