freebsd-dev/usr.sbin/syslogd
Ed Schouten 77f0ef9a96 Add RFC 5424 syslog message parsing to syslogd.
Syslogd currently uses the RFC 3164 format for its log messages.One
limitation of RFC 3164 is that it cannot be used to log entries with
sub-second precision timestamps. One of our users has expressed a desire
for doing this for doing some basic performance measurements.

This change attempts to make a first cut at switching to RFC 5424 based
logging. The first step is to alter syslogd's input path to properly
parse such messages. It alters the logmsg() prototype to match the
fields of RFC 5424. The parsemsg() function is extended to parse both
RFC 3164 and 5424 messages and call into logmsg() accordingly.

Additional changes include:

- Introducing proper parsing of timestamps, so that they can be printed
  in any desired output format. This means we need to infer the year and
  timezone for RFC 3164 timestamps.
- Removing ISKERNEL. This can now be realised by simply providing an
  APP-NAME (== "kernel").
- Extending RFC 3164 parsing to trim off the TAG prefix and using that
  to derive APP-NAME and PROCID.
- Increase MAXLINE. RFC 5424 mentions we should support 2k messages.

Differential Revision:	https://reviews.freebsd.org/D14926
2018-04-06 12:57:01 +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 Add RFC 5424 syslog message parsing to syslogd. 2018-04-06 12:57:01 +00:00