Commit Graph

6 Commits

Author SHA1 Message Date
David Bright
b326fec486 Add newsyslog capability to write RFC5424 compliant rotation message.
This modification adds the capability to newsyslog to write the
rotation message in a format that is compliant with RFC5424. This
capability is enabled on a per-log file basis through a new value
("T") in the flags field in newsyslog.conf. This is useful on systems
that use the RFC5424 format for log files so that the rotation message
format matches that of the other log messages. There has been recent
mention of adding an RFC5424 compliant mode to syslogd and at least
one alternative system log daemon (rsyslogd) that already has the
capability to use that format.

Reviewed by:	vangyzen, ngie
Approved by:	vangyzen (mentor)
MFC after:	2 months
Relnotes:	yes
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D10253
2017-05-26 16:36:30 +00:00
Garance A Drosehn
398faf1205 Drop the include for <stdint.h>, it was only needed when this was
using __DECONST() for something, and that reference has been removed.

Noticed by:	Helge Oldach
MFC after:	13 days
2004-06-07 21:53:27 +00:00
Garance A Drosehn
c303328741 Handle a 'const' parameter without using __DECONST().
MFC after:	14 days
2003-10-04 02:24:47 +00:00
Garance A Drosehn
6a1485e2fe Restructure the time processing routines, mainly to fix up the
"will trim at" message printed when the user requests '-v'.  The
previous code would often print the wrong time, such as:
On Sept 22, run:   newsyslog -nv /var/log/wtmp
        And see:   will trim at Mon Sep  1 05:00:00 2003
    correct msg:   will trim at Wed Oct  1 05:00:00 2003

MFC after:	20 days
2003-09-23 00:00:26 +00:00
Garance A Drosehn
526d55a405 Correct the calculation of "a leap year" in parseDWM. The calculation
would only match a leap year every 400 years.  The parseDWM code first
showed up in April 2000, so the first time this bug would cause any
confusion is in Feb 2004.

MFC after:	18 days
2003-09-14 00:56:50 +00:00
Garance A Drosehn
2f8d7c56da Move the parse8601 and parseDWM routines into a new ptime.c file. The
only code-change is to add a "next_time" parameter to both routines (and
that is not used yet).  A later update will make "next_time" more useful.

MFC after:	20 days
2003-09-12 01:33:37 +00:00