User Story
As a software maintainer,
I want structured logging implemented in the execute_graph_generation function
so that log data integrates with monitoring systems and output verbosity can be programmatically controlled.
Background
The current implementation uses print statements (e.g., print(f"Splitting text into...") and print(f"Processing chunk...") in eknowledge/main.py) for progress reporting. This creates three key issues:
- Monitoring limitations: Print outputs can't be easily parsed by tools like Prometheus/Grafana
- Verbosity control: No programmatic way to filter debug vs. operational logs
- Production unsuitability: Print statements lack metadata (timestamps, severity levels) needed for diagnostics
The primary focus is modifying execute_graph_generation in eknowledge/main.py, though other modules using similar patterns may need future updates.
Acceptance Criteria
Validation
- Run
execute_graph_generation with verbose=True and verify DEBUG logs appear in structured format
- Test with
verbose=False and confirm only WARNING/INFO logs appear
- Pipe output to
jq (or similar) to validate JSON structure
- Verify no print statements remain in
main.py via code review
User Story
As a software maintainer,
I want structured logging implemented in the
execute_graph_generationfunctionso that log data integrates with monitoring systems and output verbosity can be programmatically controlled.
Background
The current implementation uses print statements (e.g.,
print(f"Splitting text into...")andprint(f"Processing chunk...")ineknowledge/main.py) for progress reporting. This creates three key issues:The primary focus is modifying
execute_graph_generationineknowledge/main.py, though other modules using similar patterns may need future updates.Acceptance Criteria
execute_graph_generationwith structured logging using Python'sloggingorstructlogverboseflag behavior by:verbose=Trueverbose=FalseValidation
execute_graph_generationwithverbose=Trueand verify DEBUG logs appear in structured formatverbose=Falseand confirm only WARNING/INFO logs appearjq(or similar) to validate JSON structuremain.pyvia code review