forked from 0xWheatyz/SPARC
Replace print() calls with structured Python logging in analyzer.py, serp_api.py, and llm.py #905
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
Multiple backend modules use
print()for diagnostic output. This makes it impossible to control log levels, filter noise in production, or integrate with 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 normal operations,WARNING/ERRORfor problems.main.pyor a dedicatedlogging_config.pythat reads the log level from aLOG_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.Reference
ROADMAP.md — P2 Backend — Add structured logging
Triage: RESOLVED
This issue has been fully implemented in the fork main branch.
Evidence:
analyzer.py,serp_api.py, andllm.pyall uselogging.getLogger(__name__)-- zeroprint()calls remain.config.pyconfigures root logger fromLOG_LEVELenv var (line 13-17), defaulting to INFO..env.exampledocuments theLOG_LEVELvariable.All acceptance criteria are met. Recommending closure.