in reply to Removing old records from log files
With that rate of logging, you are likely to need locks the logger respects to modify the file in place. Given that, a binary search strategy will speed your search for the cutoff time. RecursivelyIteratively estimate the location of the first record you want to keep.
Another approach would be to set up a cron job renaming the log file out of the way at set times. You may have a system utility called logrotate which specializes in that.
Update: Oops :-)
After Compline,
Zaxo
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Removing old records from log files
by claree0 (Hermit) on Aug 22, 2001 at 14:31 UTC |