Cropping log files

Kamus of Kadizhar yan at NsOeSiPnAeMr.com
Tue Dec 16 07:12:33 EST 2003


Duncan Booth wrote:
> 
> If you can modify your requirements to say that you need to keep 'at least 
> n records' then rotating file logger will do that, just make sure that the 
> size that is kept in all files is at least n times the largest record you 
> might log. Of course the records will then be split across multiple files.

You know, that just might work.  I need more-or-less n records; the 
number is not critical.

So, if I allow the rotating logger a max file size that accomodates 
approx. n/4 records, tell it to keep older files to a depth of 6, then 
read older log files until I get some number of records greater than n....

I just have bad experience with letting log files get to infinite 
length... :-)

-- 
     o__      |  If you're old, eat right and ride a decent bike.
     ,>/'_    |                                       Q.
    (_)\(_)   |                                       Usenet posting`





More information about the Python-list mailing list