forked from 0xWheatyz/SPARC
Replace print() calls with structured logging in analyzer.py, serp_api.py, and llm.py #339
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?
Problem
Multiple backend modules use bare
print()calls for diagnostic output. This prevents log level filtering, consistent formatting, and integration with log aggregation systems.Work
loggingconfiguration in a sharedlogger.pyor inconfig.py(log level fromLOG_LEVELenv var, defaulting toINFO).print()calls inanalyzer.py,serp_api.py, andllm.pywithlogger.info()/logger.warning()/logger.error()as appropriate.uvicornlogging to use the same handler.Acceptance Criteria
print()calls remain in the three listed files.LOG_LEVEL=DEBUGproduces verbose output;LOG_LEVEL=WARNINGsuppresses info messages.Reference
Roadmap item: P2 Backend — Add structured logging.
[Repo Manager] This issue is resolved. All three files (analyzer.py, serp_api.py, llm.py) use logging.getLogger(name) with no remaining print() calls. config.py configures LOG_LEVEL from environment.