Skip to content

enhancement: Replace all print() calls in agents.py with structured logging #75

@QuantumByte-01

Description

@QuantumByte-01

Problem

agents.py has 15+ print() calls scattered across all agent nodes. They can't be silenced, filtered by level, or routed to log aggregators in production.

Solution

Replace with logging.getLogger("agents") and use appropriate levels (info, warning, error). Already done correctly in retrieval.py — follow that pattern.

Affected locations

  • KSSearchAgent.run() — search progress prints
  • VectorSearchAgent.run() — error print
  • extract_keywords_and_rewrite() — node entry + debug prints
  • execute_search(), fuse_results(), generate_final_response() — all node prints
  • handle_chat() — error print + traceback

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions