public static String getLogMessage(QueryObserver observer, long startTime, String query) {
    String usedIndexesString = null;
    float time = 0.0f;

    if (startTime > 0L) {
      time = (NanoTimer.getTime() - startTime) / 1.0e6f;
    }

    if (observer instanceof IndexTrackingQueryObserver) {
      IndexTrackingQueryObserver indexObserver = (IndexTrackingQueryObserver) observer;
      @SuppressWarnings("unchecked")
      Map<Object, Object> usedIndexes = indexObserver.getUsedIndexes();
      indexObserver.reset();
      StringBuilder buf = new StringBuilder();
      buf.append(" indexesUsed(");
      buf.append(usedIndexes.size());
      buf.append(")");
      if (usedIndexes.size() > 0) {
        buf.append(":");
        for (Iterator<Map.Entry<Object, Object>> itr = usedIndexes.entrySet().iterator(); itr
            .hasNext();) {
          Map.Entry<Object, Object> entry = itr.next();
          buf.append(entry.getKey().toString()).append(entry.getValue());
          if (itr.hasNext()) {
            buf.append(",");
          }
        }
      }
      usedIndexesString = buf.toString();
    } else if (DefaultQuery.QUERY_VERBOSE) {
      usedIndexesString = " indexesUsed(NA due to other observer in the way: "
          + observer.getClass().getName() + ")";
    }

    return String.format("Query Executed%s%s", startTime > 0L ? " in " + time + " ms;" : ";",
        usedIndexesString != null ? usedIndexesString : "");
  }
Returns a sorted list of all region full paths found in the specified cache.

@param cache The cache to search.
@param recursive recursive search for sub-regions
@return Returns a sorted list of all region paths defined in the distributed system.
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/functions/DataCommandFunction.java