code: public void toSyslogMessage(@Nonnull MessageFormat messageFormat, @Nonnull Writer out) throws IOException {
          switch (messageFormat) {
              case RFC_3164:
                  toRfc3164SyslogMessage(out);
                  break;
              case RFC_5424:
                  toRfc5424SyslogMessage(out);
                  break;
              case RFC_5425:
                  toRfc5425SyslogMessage(out);
                  break;
              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
  @param out                 output {@linkplain Writer}