public String toString()

in src/main/java/org/apache/sling/discovery/base/commons/DefaultTopologyView.java [245:272]


    public String toString() {
        StringBuilder sb = new StringBuilder();
        try{
            boolean firstCluster = true;
            for (ClusterView clusterView : getClusterViews()) {
                if (!firstCluster) {
                    sb.append(", ");
                }
                firstCluster = false;
                sb.append("[clusterId=" + clusterView.getId() + ", instances=");
                boolean firstInstance = true;
                for (InstanceDescription id : clusterView.getInstances()) {
                    if (!firstInstance) {
                        sb.append(", ");
                    }
                    firstInstance = false;
                    sb.append("[id=" + id.getSlingId() + ", isLeader=" + id.isLeader() + 
                            ", isLocal=" + id.isLocal() + "]");
                }
                sb.append("]");
            }
        } catch(Exception e) {
            // paranoia fallback
            sb = new StringBuilder(instances.toString());
        }
        return "DefaultTopologyView[current=" + isCurrent() + ", num=" + instances.size() + ", instances="
                + sb + "]";
    }