code: private static StringBuilder formatMessage(LogData logData) {
      SimpleMessageFormatter formatter =
          new SimpleMessageFormatter(logData.getTemplateContext(), logData.getArguments());
      StringBuilder out = formatter.build();
      if (logData.getArguments().length > formatter.getExpectedArgumentCount()) {
        // TODO(dbeaumont): Do better and look at adding formatted values or maybe just a count?
        out.append(EXTRA_ARGUMENT_MESSAGE);
      }
      return out;
    }
docs: Formats a log message which contains placeholders (i.e. when a template context exists). This
  does not format only metadata, only the message and its arguments.