newsyslog 1.9

This is the first time I've had a chance to really work on this package in about six years, so much of what I did was haul it bodily up to the level of my current packages. It now uses Automake as well as Autoconf, uses the portability and utility library from rra-c-util, is closer to my current coding style, and has a more standard documentation layout. The test suite is still a bit bogus and has to be disabled if building outside of the source tree, but time enough to fix that another day.

The main point of the update is to add a couple of features that we've been missing. The main one is the ability to skew timestamps into the past for the purposes of determining the file and directory names to which logs are saved. We run newsyslog at 23:45 from cron.daily to try to rotate roughly a day of logs to the date corresponding to what's in the log, but since this is in cron.daily, sometimes other jobs are slow and push newsyslog later into the next day. When that happens, logs are saved under the wrong file names, conflict with the next day's logs, and cause other annoyances. The skew option can be used to generate dates as if it were some length of time earlier, adding more leeway for log rotation to run late.

Also added is the ability to name the same log for both copy and truncate. Previously, there was no way to both copy the current contents of the log and then truncate it (without creating a new file and renaming the old one). This is required for some broken software that can't cope with the log file being renamed but can cope with it being truncated, so this is now supported.

You can get the latest version from the newsyslog distribution page.

Posted: 2011-12-16 15:28 — Why no comments?

Last spun 2022-02-06 from thread modified 2013-01-04