code: public String formatMessage(RepositoryLogRecord record, Locale tmpLocale) {
          // no localization case (CBE or non-CBE)
          if (record.getLocalizable() == WsLogRecord.REQUIRES_NO_LOCALIZATION) {
              String traceString = record.getRawMessage(); // LIDB2667.13 start
              Object[] parms = record.getParameters();
  
              return formatUnlocalized(traceString, parms); // LIDB2667.13 end
          }
  
          if (tmpLocale == null) {
              tmpLocale = locale;
          }
  
          String localizedMsg = null;
          // If no locale specified or it's the same we have translation for already - use translated string.
          if (tmpLocale == null || tmpLocale.toString().equals(record.getMessageLocale())) {
              localizedMsg = record.getLocalizedMessage();
          }
          // if we can't use translated string translate message now.
          if (localizedMsg == null) {
              localizedMsg = translateMessage(record, tmpLocale);
          }
  
          // If message is empty no localization or formating is necessary.
          if (localizedMsg == null) {
              return "";
          }
  
          // sub values from parameters if needed.
          try {
              localizedMsg = MessageFormat.format(localizedMsg, record.getParameters());
          } catch (IllegalArgumentException iae) {
              // some trace messages have {} in them that are not parameters.
              // consume exception and don't format.
          }
  
          return localizedMsg;
      }
docs: Returns the formatted version of the record's message in a specified
  locale with any place holder parameters substituted with values.
  <p>
  In cases where localization is successful, the formatted message
  is the localized message with any place holder values filled in with
  corresponding parameter values.
  <p>
  In cases where the localized message is <code>null</code>, the formatted message
  is the raw message with any place holder values filled in with
  corresponding parameter values.
  <p>
  This is the same behavior as found in {@link java.util.logging.LogRecord#getMessage()}
  
  @param record log record to read the message from.
  @param tmpLocale locale to translate message into.
  @return the fully localized and formatted message.
  @see java.util.logging.LogRecord#getMessage()