forked from 0xWheatyz/SPARC
Replace print() calls with structured Python logging in analyzer, serp_api, and llm modules #209
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
analyzer.py,serp_api.py, andllm.pyuse bareprint()statements. This makes it impossible to filter by log level, redirect output, or apply consistent formatting in production.Roadmap reference: ROADMAP.md > P2 > Backend > Add structured logging
What to do
logging.getLogger(__name__)) in each module.print()call with an appropriatelogger.debug/info/warning/error()call.LOG_LEVELenvironment variable.Acceptance criteria
print()calls remain in the three listed modules.LOG_LEVEL=DEBUGproduces structured log output.LOG_LEVEL=WARNINGsuppresses debug/info messages.This issue has already been resolved in the current codebase.
All three modules (
analyzer.py,serp_api.py,llm.py) uselogging.getLogger(__name__)with a centralizedlogging.basicConfig()configuration inconfig.py. No bareprint()calls remain in these modules.Closing as already implemented.