code: public void toRfc3164SyslogMessage(Writer out) throws IOException {
  
          int pri = facility.numericalCode() * 8 + severity.numericalCode();
  
          out.write('<');
          out.write(Integer.toString(pri));
          out.write('>');
          out.write(rfc3164DateFormat.format(timestamp == null ? new Date() : new Date(timestamp))); // message time
          out.write(SP);
          out.write((hostname == null) ? localhostNameReference.get() : hostname); // emitting server hostname
          out.write(SP);
          writeNillableValue(appName, out); // appname
  
          if (msg != null) {
              out.write(": ");
              msg.writeTo(out);
          }
      }
docs: Generates an <a href="http://tools.ietf.org/html/rfc3164">RFC-3164</a> message.