code: protected String formatMessage(String message, Object[] parameters) {
          String formatted;
          if (printfStyle) {
              formatted = String.format(message, parameters);
          } else {
              formatted = MessageFormat.format(message, parameters);
          }
          return formatted;
      }
docs: Returns formatted Event message when provided the message template and
  parameters.
  
  @param message Message template body.
  @param parameters Array of parameters for the message.
  @return Formatted message.