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 jinq0123
Recipients
Date 2007-07-16.03:05:51
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Calling handleError is a workaround, not the correct way of log4j.  This is Python, and should be easy to use. Subclass & override is a little hard to use. If it is required for every users to subclass or patch RotatingFileHandler to use it, so why not patch it in the released version? Everybody expect logging module has a behavior in common with log4j.

The exception of rename() is real. rename() fails if the source file is locked. I found UltraEdit will lock file. Others say tail -f will lock file too. 

In C++ or java, rename() just returns error, but Python raises exception and causes different logging behavior. Why not just ignore the exception of rename()? Or try rename() and finally open the log file?

By the way, log4j is much more robust on opening the log file. It will create the parent directories and retry if open failed. Python logging should learn from log4j.
History
Date User Action Args
2007-08-23 14:58:30adminlinkissue1752539 messages
2007-08-23 14:58:30admincreate