Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jul 2018 10:57:23 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r335861 - head/usr.sbin/syslogd
Message-ID:  <201807021057.w62AvNnO044193@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807021057.w62AvNnO044193>