log file names w/timestamps and timezone (was "Re: Rotating Argus Logs")
r.fulton at auckland.ac.nz
Wed Dec 28 18:14:29 EST 2005
Dave Plonka wrote:
> On Wed, Dec 28, 2005 at 05:32:53PM +1300, Russell Fulton wrote:
>> -- it's smart to name log files so that
>> shell globbing gets the files in chronological order ;)
> That would be nice, but beware that in locales that have Daylight
> Savings Time (where the same hour of one day recurs in fall) it's hard
> to include a local timestamp in the filename and get it to sort
> correctly for all days of the year.
I have a very simple minded way of dealing with this: my rollover
script checks to see if the file name exist and if it does simply
appends a '-1' to the end of the file name before opening it. So once a
year I get a daily directory with 11 files and one with 13.
More information about the argus