adrai-org / adrai-org/adr-ai-tools-py
[FEATURE] Integrate LoggingService with dependency injection pattern
- 主要語言
- Python
- 星號
- 4
- 分支
- 1
- PR 合併指標
- 30 天內沒有已合併 PR
描述
## ✨ Feature Request Template
### **Feature Description**
Integrate LoggingService with the established dependency injection pattern to enable other services to use logging capabilities consistently throughout the application.
### **Use Case**
Currently, LoggingService is only instantiated in the CLI callback, making it difficult for other services to access logging functionality. Services like AdrInitializer, ConfigurationService, and FileSystemService may need to log debug information, warnings, or errors but have no standardized way to access the logging infrastructure.
### **Proposed Solution**
Implement LoggingService integration with the dependency injection pattern:
- Enable LoggingService to be injected into other services via constructor injection
- Establish patterns for how services should use injected LoggingService
- Ensure logging configuration is propagated consistently across all services
- Maintain the current CLI-level logging configuration while enabling service-level usage
### **Alternatives Considered**
1. **Global logging configuration**: Use Python's global logging directly in services (violates service layer architecture)
2. **Service-specific logging**: Each service configures its own logging (inconsistent behavior)
3. **Dependency injection**: Pass LoggingService to services that need it (follows established patterns)
### **Acceptance Criteria**
Define what "done" looks like for this feature:
- [ ] ADR documented for LoggingService dependency injection patterns
- [ ] Update existing services to optionally accept LoggingService via constructor injection
- [ ] Implement service-level logging usage examples
- [ ] Unit tests verify LoggingService integration with services
- [ ] E2E tests verify logging behavior from service operations
- [ ] Documentation updated with service logging patterns
### **Additional Context**
This feature should follow the established dependency injection patterns (ADR-0016) and service layer architecture (ADR-0015). Consider how LoggingService fits into the manual dependency wiring approach used in the CLI layer.
The integration should be optional to maintain backward compatibility and not require all services to use logging.
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。