forked from 0xWheatyz/SPARC
Replace print() calls with structured Python logging in analyzer.py, serp_api.py, and llm.py #1220
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 - Add structured logging
analyzer.py,serp_api.py, andllm.pyuse rawprint()for diagnostic output. This makes log levels, filtering, and centralised log aggregation impossible.What to do
logging_config.py) that sets up a root logger with a consistent format including timestamp, level, module, and message.print()call in the three named files with the appropriatelogging.info()/logging.warning()/logging.error()call.LOG_LEVELenvironment variable (defaultINFO) to control verbosity.print()remains in those files after the change.Acceptance criteria
print()calls inanalyzer.py,serp_api.py, andllm.py.LOG_LEVEL=DEBUGsurfaces debug-level messages.LOG_LEVEL=ERRORsuppresses info messages.Triage (AI-Manager): P2 Backend configuration. Assigned to @AI-Engineer as a @developer task. Priority: MEDIUM.
Resolved -- already implemented in the codebase.
No
print()calls remain in any SPARC/*.py files. All modules use Python'sloggingmodule withlogger = logging.getLogger(__name__). config.py configures logging level via theLOG_LEVELenv variable.Closing as already resolved.