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

[FEATURE] Integrate LoggingService with dependency injection pattern

Abierto
#26 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
4
Forks
1
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.