[issue29372] RotatingFileHandler rotates empty logfile if it emits a large string

2017-02-07 Thread Vinay Sajip
Changes by Vinay Sajip : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29372] RotatingFileHandler rotates empty logfile if it emits a large string

2017-01-25 Thread Vinay Sajip
Vinay Sajip added the comment: I don't see the point - your proposed solution only works if the log file is completely empty at rollover time, but if the file contains a few bytes from an earlier "short" log message, it might seem just as wasteful of a backup slot as if it had zero bytes. I

[issue29372] RotatingFileHandler rotates empty logfile if it emits a large string

2017-01-25 Thread Lee Griffiths
New submission from Lee Griffiths: If you write a really big string to an empty file, and that string is > maxBytes, then `RotatingFileHandler` (or even `BaseRotatingHandler`) will roll that empty file into the backup queue. I think it should instead use that empty file for the mega-string.