code: public String toSyslogMessage(MessageFormat messageFormat) {
          switch (messageFormat) {
              case RFC_3164:
                  return toRfc3164SyslogMessage();
              case RFC_5424:
                  return toRfc5424SyslogMessage();
              case RFC_5425:
                  return toRfc5425SyslogMessage();
              default:
                  throw new IllegalStateException("Unsupported message format '" + messageFormat + "'");
          }
      }
docs: Generates a Syslog message complying to the <a href="http://tools.ietf.org/html/rfc5424">RFC-5424</a> format
  or to the <a href="http://tools.ietf.org/html/rfc3164">RFC-3164</a> format.
  
  @param messageFormat message format, not {@code null}