Date: Mon, 2 Apr 2018 18:22:07 +0800 From: Ben Woods <woodsb02@gmail.com> To: Ed Schouten <ed@nuxi.nl> Cc: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Re: Add option -Z to syslogd(8) to use ISO 8601 timestamps Message-ID: <CAOc73CAL%2BSP9UtTvHLFncVO0R2vuTfkOCNmcRCMVtxdhB_14Xw@mail.gmail.com> In-Reply-To: <CABh_MKkwQwry6Sq4bJfqn8r1pejjXsqggtyv7cBFjd4AGL8n=w@mail.gmail.com> References: <CAOc73CCzOoiq9YVC5DJgODC7yF21LCxNXR7aNfKc2FemGOR2cA@mail.gmail.com> <CABh_MKkwQwry6Sq4bJfqn8r1pejjXsqggtyv7cBFjd4AGL8n=w@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2 April 2018 at 03:33, Ed Schouten <ed@nuxi.nl> wrote: > Wow! That's a coincidence. I actually started working on something in > the same area a couple of days ago. One of our customers requires > sub-second precision of log entries, which is why I implemented RFC > 5424 support for FreeBSD's syslogd a couple of days ago. I sent out a > pull request a couple of minutes ago and only noticed your email just > now. > > https://reviews.freebsd.org/D14926 > > This patch doesn't change the output format of syslogd. It only adds > the RFC 5424 parsing and changes the internal model of syslogd to be > based on RFC 5424. Changing the output format to use ISO 8601 > formatting was planned for a separate change. > > What are your thoughts on my pull request? If you like it, maybe it > makes more sense to land my change first before applying yours? > > -- > Ed Schouten <ed@nuxi.nl> > Nuxi, 's-Hertogenbosch, the Netherlands > Hi Ed, That is a coincidence. Having looked through your code, I realise it is far better than mine, and mine actually resulted in the syslogd output being non-compliant with both RFC3164 and RFC5424 (by using the RFC5424 timestamp format with the remainder of the log matching the RFC3164 format). I have therefore abandoned my review in favour of yours. My effort has not been wasted though, as it meant that I was recently familiar with the syslogd.c code, and the contents of RFC3164 and RFC5424, and therefore had a headstart in reviewing your patch. I have provided some comments in phabricator for your consideration. I think you have already handled the hard part of the migration to RFC5424, which is the updated parsing logic. Whilst you have yet changed the log output format to RFC5424, I suspect that will be the easy bit. When it comes time to change the output format, it is worth noting that NetBSD has provided the "-o" syslogd argument to allow the sysadmin to select the output format: -o output_format Select output message format. bsd, rfc3164 traditional BSD Syslog format (default) syslog, rfc5424 new syslog-protocol format Regards, Ben -- From: Benjamin Woods woodsb02@gmail.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOc73CAL%2BSP9UtTvHLFncVO0R2vuTfkOCNmcRCMVtxdhB_14Xw>