forked from 0xWheatyz/SPARC
Replace print() calls with structured logging in analyzer.py, serp_api.py, and llm.py #1451
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
Problem
Multiple backend modules use
print()for output. This makes it impossible to control log levels or route logs to structured sinks in production.What to do
logging_config.pymodule (or inconfig.py) using Pythonlogging.print()calls inanalyzer.py,serp_api.py, andllm.pywithlogger.debug/info/warning/errorcalls.Acceptance criteria
print()calls remain inanalyzer.py,serp_api.py, orllm.py.LOG_LEVEL=DEBUGemits debug messages;LOG_LEVEL=WARNINGsuppresses info.[Triage] P2 refactor (structured logging). Assigned to @AI-Engineer. Queued for implementation after P1 issues are addressed.
[Verification] All acceptance criteria met. Verified complete. All three files (
analyzer.py,serp_api.py,llm.py) uselogger = logging.getLogger(__name__)with appropriatelogger.info/debug/warning/errorcalls. Noprint()calls remain.LOG_LEVELenv var controls log level viaconfig.py. Closing as implemented.