[issue8764] logging RotatingFileHandler cause too long to fininsh

Vinay Sajip report at bugs.python.org
Wed May 19 15:21:16 CEST 2010


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

If you look closely, the system is not determining the name of the next log file. It is renaming log files - app.log.2 -> app.log.3, app.log.1 -> app.log.2, app.log -> app.log.1. The "next log file" is always app.log (or whatever the base file name is, I've just used app.log as an example).

It doesn't make sense to set a very large backupCount value, say of ten million (as in your example); why would you want to do this? Did you perhaps mean 10,000,000 for the maxBytes value? If you did mean backupCount, and if you do have a valid reason, then you can subclass this handler and write your own rollover implementation which does whatever you want.

----------
resolution:  -> invalid
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8764>
_______________________________________


More information about the Python-bugs-list mailing list