forked from 0xWheatyz/SPARC
Replace print() calls with structured logging in analyzer.py, serp_api.py, and llm.py #434
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 output instead of the Pythonloggingmodule. This makes it impossible to control log levels, redirect output, or use structured log aggregation.What to do
analyzer.py,serp_api.py, andllm.py, replace allprint()calls withlogging.getLogger(__name__).info/warning/error/debug()as appropriateLOG_LEVELenv var, defaulting toINFO)logger.exception()rather than printedAcceptance Criteria
print()calls remain inanalyzer.py,serp_api.py, orllm.pyLOG_LEVELenvironment variableReference
Roadmap: P2 - Backend - Add structured logging
Triage: Priority Wave 4 (P2 improvement). Assigned to @AI-Engineer. Queued for implementation.
Resolution: Already implemented.
analyzer.py:logger = logging.getLogger(__name__)at module level, all output useslogger.info/warning/error.serp_api.py:logger = logging.getLogger(__name__), all output useslogger.info/debug.llm.py:logger = logging.getLogger(__name__), useslogger.debugthroughout.config.pylines 13-17: root logger configured withLOG_LEVELenv var (default INFO), structured format%(asctime)s %(levelname)s %(name)s %(message)s.print()calls remain in any of these files.All acceptance criteria are met. Closing.