[docs] [issue29105] code or doc improvement for logging.handlers.RotatingFileHandler
report at bugs.python.org
Thu Dec 29 11:29:54 EST 2016
New submission from iMath:
class logging.handlers.RotatingFileHandler(filename, mode='a', maxBytes=0, backupCount=0, encoding=None, delay=0)
if backupCount is zero and maxBytes is non-zero, the log file size could exceed maxBytes, i.e. we are not able to restrict the log file size using RotatingFileHandler at this case .
I suggest add the above description to the doc
If possible , set backupCount=1 by default to avoid this pitfall as much as possible.
The doc right now just says "if either of maxBytes or backupCount is zero, rollover never occurs.", it is too difficult to understand the meaning of 'Rollover' to aviod the pitfall .
assignee: docs at python
nosy: docs at python, redstone-cold
title: code or doc improvement for logging.handlers.RotatingFileHandler
versions: Python 3.6
Python tracker <report at bugs.python.org>
More information about the docs