forked from 0xWheatyz/SPARC
Refactor: Replace print() calls with structured logging in analyzer.py, serp_api.py, and llm.py #716
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?
Summary
Several backend modules use
print()for diagnostics. This produces unstructured, unlabelled output that is hard to filter or forward to log aggregators.What to do
print()calls inanalyzer.py,serp_api.py, andllm.pywith calls to alogging.getLogger(__name__)logger.DEBUGfor verbose trace output,INFOfor milestones,WARNING/ERRORfor recoverable/fatal conditions.LOG_LEVELcan be set via environment variable.Acceptance Criteria
print()calls remain in the three target files.LOG_LEVEL=DEBUGproduces timestamped, levelled log lines.LOG_LEVEL=WARNINGsuppresses debug/info output.Reference
Roadmap: P2 Backend — Add structured logging.
[Repo Manager] Already resolved. All three files use logging.getLogger(name). LOG_LEVEL env var configured in config.py.
Closing as already implemented in the codebase.