forked from 0xWheatyz/SPARC
Replace print() calls with structured logging in analyzer.py, serp_api.py, and llm.py #667
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.pyuseprint()for diagnostic output. This makes it impossible to control log verbosity, filter by severity, or integrate with log aggregation tooling.What to do
print()call in the three files with calls to Pythonlogging(logger.info,logger.warning,logger.error, etc.).get_logger(__name__)helper or configure root logging inmain.pywith a consistent format (timestamp, level, module name).LOG_LEVELenvironment variable (defaultINFO) to allow runtime verbosity control.Acceptance criteria
print()calls remain in the three target files.logging.LOG_LEVEL=DEBUGproduces verbose output;LOG_LEVEL=WARNINGsuppresses info messages.References
Roadmap item: P2 Backend — structured logging.
Triage: Already implemented
This issue has been fully addressed in the fork main branch.
Verification:
print()calls remain inSPARC/analyzer.py,SPARC/serp_api.py, andSPARC/llm.py.logging.getLogger(__name__)for structured logging.SPARC/config.pyconfigures root logging withLOG_LEVELenv var (defaultINFO)..env.exampledocuments theLOG_LEVELvariable.All acceptance criteria are met. Closing.