Author: ed
Date: Mon Jul  2 10:57:22 2018
New Revision: 335861
URL: https://svnweb.freebsd.org/changeset/base/335861

Log:
  Restore the order in which RFC 3164 messages with fac/pri are formatted.
  
  The refactoring of the syslogd code to format messages using iovecs
  slightly altered the output of syslogd by placing the facility/priority
  after the hostname, as opposed to printing it right before. This change
  reverts the behaviour to be consistent with how it was before.
  
  PR:           229457
  Reported by:  Andre Albsmeier
  MFC after:    1 week

Modified:
  head/usr.sbin/syslogd/syslogd.c

Modified: head/usr.sbin/syslogd/syslogd.c
==============================================================================
--- head/usr.sbin/syslogd/syslogd.c     Mon Jul  2 09:14:00 2018        
(r335860)
+++ head/usr.sbin/syslogd/syslogd.c     Mon Jul  2 10:57:22 2018        
(r335861)
@@ -1873,8 +1873,6 @@ fprintlog_rfc3164(struct filed *f, const char *hostnam
                /* Message written to files. */
                iovlist_append(&il, timebuf);
                iovlist_append(&il, " ");
-               iovlist_append(&il, hostname);
-               iovlist_append(&il, " ");
 
                if (LogFacPri) {
                        iovlist_append(&il, "<");
@@ -1918,6 +1916,9 @@ fprintlog_rfc3164(struct filed *f, const char *hostnam
 
                        iovlist_append(&il, "> ");
                }
+
+               iovlist_append(&il, hostname);
+               iovlist_append(&il, " ");
                break;
        }
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to