private static void bundleToShortString(Bundle bundle, StringBuilder b) {
    boolean first = true;
    for (String key : bundle.keySet()) {
      if (!first) {
        b.append(", ");
      }
      b.append(key).append('=');
      Object value = bundle.get(key);
      if (value instanceof int[]) {
        b.append(Arrays.toString((int[]) value));
      } else if (value instanceof byte[]) {
        b.append(Arrays.toString((byte[]) value));
      } else if (value instanceof boolean[]) {
        b.append(Arrays.toString((boolean[]) value));
      } else if (value instanceof short[]) {
        b.append(Arrays.toString((short[]) value));
      } else if (value instanceof long[]) {
        b.append(Arrays.toString((long[]) value));
      } else if (value instanceof float[]) {
        b.append(Arrays.toString((float[]) value));
      } else if (value instanceof double[]) {
        b.append(Arrays.toString((double[]) value));
      } else if (value instanceof String[]) {
        b.append(Arrays.toString((String[]) value));
      } else if (value instanceof CharSequence[]) {
        b.append(Arrays.toString((CharSequence[]) value));
      } else if (value instanceof Parcelable[]) {
        b.append(Arrays.toString((Parcelable[]) value));
      } else if (value instanceof Bundle) {
        b.append(bundleToString((Bundle) value));
      } else {
        b.append(value);
      }
      first = false;
    }
  }
Intent object to string, the string would be in the format of "Intent { ... }".
xlog/src/main/java/com/elvishew/xlog/internal/util/ObjectToStringUtil.java