forked from 0xWheatyz/SPARC
Replace print() calls with structured Python logging in analyzer, serp_api, and llm modules #1382
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?
Background
Roadmap item: P2 Backend — Add structured logging
analyzer.py,serp_api.py, andllm.pyuseprint()for diagnostics. This makes it impossible to filter log levels, redirect output to a log aggregator, or produce structured JSON logs for observability tooling.Task
print()calls inanalyzer.py,serp_api.py, andllm.pywithlogging.getLogger(__name__)calls at appropriate levels (DEBUG,INFO,WARNING,ERROR).LOG_LEVELenv var (defaultINFO).LOG_FORMAT=jsonenv var (usingpython-json-loggeror similar).print()debug calls across the codebase.Acceptance Criteria
print()calls remain inanalyzer.py,serp_api.py, orllm.py.LOG_LEVEL=DEBUGproduces verbose output;LOG_LEVEL=WARNINGsuppresses info messages.Reference
See ROADMAP.md § P2 Backend.
Resolved by PRs #29 and #54 (merged). All
print()calls inanalyzer.py,serp_api.py, andllm.pyhave been replaced with structured Python logging. No bareprint()calls remain in the SPARC package.