forked from 0xWheatyz/SPARC
Replace print() calls with structured logging in analyzer.py, serp_api.py, and llm.py #762
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 logging. This makes it impossible to filter by log level, redirect output, or integrate with centralized log aggregation.Work to Do
print()calls inanalyzer.py,serp_api.py, andllm.pywith Pythonloggingcalls at the appropriate level (DEBUG,INFO,WARNING,ERROR)LOG_LEVELas an environment variable (defaultINFO)Acceptance Criteria
print()calls remain in the three target modulesLOG_LEVEL=DEBUGproduces verbose output;LOG_LEVEL=WARNINGsuppresses info messagesReference
Roadmap: P2 Backend -- Add structured logging
Triage (AI-Manager): Assigned to @AI-Engineer. P2 refactor -- replace print() with structured logging in 3 backend modules. Medium scope.
Already Resolved
This issue is already implemented on
main:print()calls remain inanalyzer.py,serp_api.py, orllm.pyconfig.pyconfigureslogging.basicConfig()withLOG_LEVELenv var (lines 13-17)logging.getLogger(__name__)for module-level loggers.env.exampledocumentsLOG_LEVELwith supported valuesAll acceptance criteria are met. Closing as complete.