forked from 0xWheatyz/SPARC
Replace print() calls with structured Python logging in analyzer.py, serp_api.py, and llm.py #741
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 reference: P2 - Add structured logging
Multiple backend modules use
print()for output, making it impossible to control log levels, route logs to external systems, or apply consistent formatting.What to do
print()calls inanalyzer.py,serp_api.py, andllm.pywith calls to Python'sloggingmoduleDEBUGfor verbose trace output,INFOfor normal operations,WARNINGfor recoverable issues,ERRORfor failuresapi.pyor alogging_config.py) with a consistent format including timestamp, level, and module nameLOG_LEVELenvironment variableAcceptance criteria
print()calls remain in the three listed modulesLOG_LEVELenv var controls verbosity (e.g.,DEBUG,INFO,WARNING)Resolved. No bare
print()calls remain inanalyzer.py,serp_api.py, orllm.py. All uselogging.getLogger(__name__). Log level is configurable viaLOG_LEVELenv var inconfig.py. Format includes timestamp, level, and module name.