private List<Pair<String, Integer>> logserverHostInfo(ApplicationVersions applicationVersions) {
        return applicationVersions.applications().stream()
                .peek(app -> log.log(Level.FINE, "Finding logserver host and port for version " + app.getVespaVersion()))
                .map(Application::getModel)
                .flatMap(model -> model.getHosts().stream())
                .filter(hostInfo -> hostInfo.getServices().stream()
                        .anyMatch(serviceInfo -> serviceInfo.getServiceType().equalsIgnoreCase("logserver")))
                .map(hostInfo -> hostInfo.getServices().stream()
                        .filter(service -> LOGSERVER_CONTAINER.serviceName.equals(service.getServiceType()))
                        .findFirst()
                        .or(() -> hostInfo.getServices().stream()
                                .filter(service -> CONTAINER.serviceName.equals(service.getServiceType()))
                                .findFirst())
                        .orElseThrow(() -> new IllegalArgumentException("No container running on logserver host")))
                .map(s -> new Pair<>(s.getHostName(), servicePort(s)))
                .toList();
    }
Gets the active Session for the given application id.

@return the active session, or null if there is no active session for the given application id.
configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java