forked from 0xWheatyz/SPARC
Replace print() calls with structured logging in analyzer.py, serp_api.py, and llm.py #312
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 — structured logging
Multiple backend modules use bare
print()for diagnostic output. This makes it impossible to control log verbosity, filter by level, or forward logs to a collector.Work Required
print()calls inanalyzer.py,serp_api.py, andllm.pywithlogging.getLogger(__name__)calls at appropriate levels (DEBUG,INFO,WARNING,ERROR)main.pyorapi.py) usinglogging.basicConfigorlogging.config.dictConfigLOG_LEVELenvironment variable (defaultINFO)LOG_LEVELto.env.exampleAcceptance Criteria
LOG_LEVEL=DEBUGproduces verbose output;LOG_LEVEL=WARNINGsuppresses info messagesprint()calls remain in the three target filesThis issue has already been resolved in the fork's main branch. Already implemented in PR #29 and #54 (structured logging). See SPARC/analyzer.py, SPARC/serp_api.py, SPARC/llm.py.
Closing as completed.