adrai-org / adrai-org/adr-ai-tools-py

[FEATURE] Integrate LoggingService with dependency injection pattern

Đang mở
#26 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
4
Fork
1
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## ✨ 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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.