Getting a TimedRotatingFileHandler not to put two dates in the same file?

David M Chess chess at us.ibm.com
Wed Oct 24 13:04:41 EDT 2012


> wrw at mac.com 

> Something like:

> Does a log file exist? -> No ->  First run; create log file & continue
>          |
>         Yes
>          |
>  Read backwards looking for date change, copy lines after change
>  to new file, delete from old file.

Yep, I'm concluding that also.

It just wasn't clear to me from the documentation whether or not the 
existing TimedRotatingFileHandler had any "at startup, see if we missed 
any rollovers, and do them now if so" function, or if there was some known 
variant that does.  The answer, apparently, being "nope".  :)  Shouldn't 
be that hard to write, so that's probably what we'll do.

DC
---
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20121024/85e90f57/attachment.html>


More information about the Python-list mailing list