forked from 0xWheatyz/SPARC
Backend: replace print() calls with structured Python logging in analyzer.py, serp_api.py, and llm.py #1316
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
Several backend modules use
print()for diagnostic output. This produces unstructured output that cannot be filtered by log level, captured by log aggregators (Loki, CloudWatch, etc.), or redirected independently of stdout.What to do
loggingat the module level inanalyzer.py,serp_api.py, andllm.py.print()calls with appropriatelogger.debug(),logger.info(),logger.warning(), orlogger.error()calls.Acceptance criteria
print()calls remain inanalyzer.py,serp_api.py, orllm.py.LOG_LEVELenvironment variable.References
Roadmap: P2 Backend — Add structured logging.
Already resolved. No
print()calls found in anySPARC/*.pyfiles. The codebase uses Pythonloggingmodule throughout (e.g.,logger = logging.getLogger(__name__)in scheduler.py, api.py, etc.).