docs: private String formatMessage(LogRecord logRecord, Object[] logParams, boolean useResourceBundle) {
          final String txt;
  
          boolean hasParams = logParams != null && logParams.length > 0;
  
          String msg = logRecord.getMessage();
  
          if (useResourceBundle) {
              ResourceBundle rb = logRecord.getResourceBundle();
              if (rb != null) {
                  try {
                      msg = rb.getString(msg);
                  } catch (Exception e) {
                  }
              }
          }
  
          if (msg != null && hasParams && msg.contains("{0")) {
              Object[] formattedParams = new Object[logParams.length];
              for (int i = 0; i < logParams.length; i++) {
                  // Do truncated stack traces where appropriate
                  if (logParams[i] instanceof TruncatableThrowable) {
                      formattedParams[i] = DataFormatHelper.throwableToString((TruncatableThrowable) logParams[i]);
                  } else if (logParams[i] instanceof Throwable) {
                      formattedParams[i] = DataFormatHelper.throwableToString(new TruncatableThrowable((Throwable) logParams[i]));
                  } else if (logParams[i] instanceof Untraceable) {
                      formattedParams[i] = logParams[i].getClass().getName(); // Use only the class name of the object
                  } else if (logParams[i] instanceof Traceable) {
                      formattedParams[i] = formatTraceable((Traceable) logParams[i]);
                  } else {
                      formattedParams[i] = logParams[i];
                  }
                  // Would any of the other parameters benefit from our whizzy formatting?
              }
              // If this is a parameter list, use MessageFormat to sort it out
              txt = MessageFormat.format(msg, formattedParams);
          } else {
              txt = msg + (hasParams ? " " + formatObj(logParams) : "");
          }
          return txt;
      }