freebsd-skq/usr.sbin/syslogd
ed fa41fad703 Push RFC 5424 message format from logmsg() into fprintlog().
Now that all of parsemsg() parses both RFC 3164 and 5424 messages and
hands them to logmsg(), alter the latter to properly forward all RFC
5424 message attributes to fprintlog(). While there, make some minor
cleanups to this code:

- Instead of extending the existing code that compares hostnames and
  message bodies for deduplication, print all of the relevant message
  fields into a single string that we can compare ('saved').

- No longer let the behaviour of fprintflog() depend on whether
  'msg == NULL' to print repetition messages, Simply decompose this
  function into fprintlog_first() and fprintlog_successive(). This
  makes the interpretation of function arguments less magical and also
  allows us to get consistent behaviour across RFC 3164 and 5424 when
  adding support for the RFC 5424 output format.

- As RFC 5424 syslog messages have a dedicated application name field,
  alter the repetition messages to be printed on behalf of syslogd on
  the current system. Change these messages to use the local hostname,
  so that it's obvious which syslogd instance detected the repetition.
  Remove f_prevhost, as it has now become unnecessary.

- Remove a useless strdup(). Deconsting the message string is safe in
  this specific case.
2018-04-06 17:16:50 +00:00
..
Makefile Use SRCTOP instead of .CURDIR relative paths with ".." 2017-02-24 21:35:59 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
pathnames.h General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
syslog.conf.5 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
syslogd.8 When parsing remote messages, require them to have standard timestamp 2017-12-05 19:54:55 +00:00
syslogd.c Push RFC 5424 message format from logmsg() into fprintlog(). 2018-04-06 17:16:50 +00:00