This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Juha.Lemmetti
Recipients Juha.Lemmetti, vinay.sajip
Date 2015-01-23.10:37:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1422009423.63.0.642413518943.issue23305@psf.upfronthosting.co.za>
In-reply-to
Content
If RotatingFileHandler is initialized with backupCount 0, the file does not rotate but grows indefinitely. This is not self-evident from the documentation.

Suggestion: either rotate (discard) the log if backupCount==0 or mention the current operation the documentation. The former leaves the user with only one log message at the worst case. 

In the latter case, the documentation can be modified to explicitly mention what the result will be if backupCount is left to its default value of 0, i.e. that the RotatingFileHandler will grow the file indefinitely regardless of the value of maxBytes value. The default value for the backupCount could also be modified, as the default value does nothing.

Tested with Windows-Python2.7, Linux-Python 3.3.2+ (Ubuntu-14.04). Can be reproduced with a simple logging example with backupCount == 0 and maxBytes > 0
History
Date User Action Args
2015-01-23 10:37:03Juha.Lemmettisetrecipients: + Juha.Lemmetti, vinay.sajip
2015-01-23 10:37:03Juha.Lemmettisetmessageid: <1422009423.63.0.642413518943.issue23305@psf.upfronthosting.co.za>
2015-01-23 10:37:03Juha.Lemmettilinkissue23305 messages
2015-01-23 10:37:02Juha.Lemmetticreate