improved logging dependency injection