diff options
author | Ed Schouten <ed@FreeBSD.org> | 2018-07-02 10:57:22 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2018-07-02 10:57:22 +0000 |
commit | 8a66bdb41446e5e007d486a6f8749f06ab30ee51 (patch) | |
tree | 103957f47064381191249fe46e0cf047ec692bbf /usr.sbin/syslogd | |
parent | 294b242d80056628fe81fbd315e21b4e47c3ac67 (diff) | |
download | src-8a66bdb41446e5e007d486a6f8749f06ab30ee51.tar.gz src-8a66bdb41446e5e007d486a6f8749f06ab30ee51.zip |
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
Notes
Notes:
svn path=/head/; revision=335861
Diffstat (limited to 'usr.sbin/syslogd')
-rw-r--r-- | usr.sbin/syslogd/syslogd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index c61abde9dfb0..0bc25109db42 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -1873,8 +1873,6 @@ fprintlog_rfc3164(struct filed *f, const char *hostname, const char *app_name, /* 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 *hostname, const char *app_name, iovlist_append(&il, "> "); } + + iovlist_append(&il, hostname); + iovlist_append(&il, " "); break; } |