forked from 0xWheatyz/SPARC
Replace print() calls with structured logging in analyzer.py, serp_api.py, and llm.py #690
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 - structured logging
Several backend modules use
print()for diagnostic output. This makes it impossible to control log levels or route logs to a structured sink in production.Work to do
logginglogger in a shared module (e.g.logger.pyor withinconfig.py)print()calls inanalyzer.py,serp_api.py, andllm.pywith appropriate log levels (logging.debug,logging.info,logging.warning,logging.error)LOG_LEVELenvironment variable (defaultINFO).env.examplewithLOG_LEVELAcceptance criteria
print()calls remain in the three target modulesLOG_LEVEL=DEBUGproduces verbose output;LOG_LEVEL=WARNINGsuppresses info messagesClosing as already implemented. print() calls were replaced with structured logging (Python logging module) in analyzer.py, serp_api.py, and llm.py. Done in PR #29 (feature/p2-config-improvements) and PR #54 (feature/structured-logging).