Bugs item #1752539, was opened at 2007-07-12 10:34 Message generated for change (Comment added) made by vsajip You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1752539&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.5 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jin Qing (jinq0123) Assigned to: Vinay Sajip (vsajip) Summary: RotatingFileHandler.doRollover behave wrong vs. log4j's Initial Comment: RotatingFileHandler.doRollover() will raise exception on rename() and cause all the subsequent log messages lost. But log4j is better. It ignore the rename() error and reset the log file. I read "[ 979252 ] Trap OSError when calling RotatingFileHandler.doRollover ( https://sourceforge.net/tracker/index.php?func=detail&aid=979252&group_id=5470&atid=105470 )", and think David London (groodude)'s solution is closer to log4j. At least, python logging implementation should follow log4j's behavior, or improve it, such as only discard the current one message. logging should be easy to use. ---------------------------------------------------------------------- >Comment By: Vinay Sajip (vsajip) Date: 2007-07-13 17:51 Message: Logged In: YES user_id=308438 Originator: NO The system was modified in the fix for #979252 to call handleError when an error occurred during the emit() processing. I am travelling and do not have access to my systems at the moment, so cannot commit to look at this just yet. For now, users are free to subclass the RotatingFileHandler and override handleError however they want, including implementing groodude's solution, which (as he says in his comments) is a band-aid to cover unknown error conditions. Since there is no good reason for the rename to fail, I would suggest to the poster to see if he can find out why he is getting exception on rename; and I will give this some thought when I next have time, but that will not be just yet, and until then I suggest using the subclass/override approach. I'll leave it open to remind me to look at it, but I believe the workarounds I have suggested are not unreasonable for now. ---------------------------------------------------------------------- Comment By: Neal Norwitz (nnorwitz) Date: 2007-07-13 03:47 Message: Logged In: YES user_id=33168 Originator: NO Vinay, could you take a look? Thanks. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1752539&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com