forked from 0xWheatyz/SPARC
Replace print() calls with structured logging in analyzer.py, serp_api.py, and llm.py #1407
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
These three modules use
print()for diagnostic output. This makes it impossible to control log levels, filter messages, or ship logs to an aggregator.What to do
print()calls inanalyzer.py,serp_api.py, andllm.pywith calls to a module-levellogger = logging.getLogger(__name__).LOG_LEVELenvironment variable (default:INFO).Acceptance criteria
print()calls remain in the three target modules.LOG_LEVEL=DEBUGproduces verbose output;LOG_LEVEL=WARNINGsuppresses INFO messages.Triage: Already resolved in main.
No
print()calls remain inanalyzer.py,serp_api.py, orllm.py. All three modules uselogging.getLogger(__name__)with structured log calls (logger.info,logger.warning, etc.). Log level is configurable viaLOG_LEVELenv var inconfig.py. Closing as complete.