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
This commit is contained in:
parent
294b242d80
commit
8a66bdb414
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335861
@ -1873,8 +1873,6 @@ fprintlog_rfc3164(struct filed *f, const char *hostname, const char *app_name,
|
|||||||
/* Message written to files. */
|
/* Message written to files. */
|
||||||
iovlist_append(&il, timebuf);
|
iovlist_append(&il, timebuf);
|
||||||
iovlist_append(&il, " ");
|
iovlist_append(&il, " ");
|
||||||
iovlist_append(&il, hostname);
|
|
||||||
iovlist_append(&il, " ");
|
|
||||||
|
|
||||||
if (LogFacPri) {
|
if (LogFacPri) {
|
||||||
iovlist_append(&il, "<");
|
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, "> ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iovlist_append(&il, hostname);
|
||||||
|
iovlist_append(&il, " ");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user