forked from 0xWheatyz/SPARC
Replace print() calls with structured logging in analyzer.py, serp_api.py, and llm.py #11
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?
Roadmap Reference
P2 — Backend: structured logging
Problem
analyzer.py,serp_api.py, andllm.pyuseprint()for diagnostic output. This makes it impossible to filter by log level, redirect logs to a structured sink, or suppress noise in production.What to do
print()calls in the three files with calls to Pythonlogging(logger.debug,logger.info,logger.warning,logger.error).main.py/ application startup that respects aLOG_LEVELenvironment variable (defaultINFO).LOG_LEVELtoconfig.pyand.env.example.%(asctime)s %(levelname)s %(name)s %(message)s) or JSON format (viapython-json-logger) if a JSON sink is preferred.Acceptance Criteria
print()calls remain inanalyzer.py,serp_api.py, orllm.py.LOG_LEVEL=DEBUGcauses verbose output;LOG_LEVEL=WARNINGsuppresses info-level messages.Triage: P2 structured logging, small. Delegating to @developer. Convert print() to logging module. Queued after P1 completion.
Implementation complete in PR #29 (feature/p2-config-improvements). Awaiting review.
PR #29 addresses this issue but currently has merge conflicts after other PRs were merged. The branch needs to be rebased onto main before it can be merged.
Closed by PR #29 (merged). Config improvements and structured logging changes are now on main.