- Revision
- 15331
- Author
- morgen
- Date
- 2007-09-14 08:21:53 -0700 (Fri, 14 Sep 2007)
Log Message
Fix for bug 10833 (chandler.log not rotating as expected) r=bear
Going back to filesize based rotation (instead of midnight-based, which
turns out actually requires the app to be running at midnight).
Going back to filesize based rotation (instead of midnight-based, which
turns out actually requires the app to be running at midnight).
Modified Paths
Diff
Modified: trunk/chandler/application/Utility.py (15330 => 15331)
--- trunk/chandler/application/Utility.py 2007-09-13 22:53:37 UTC (rev 15330) +++ trunk/chandler/application/Utility.py 2007-09-14 15:21:53 UTC (rev 15331) @@ -457,10 +457,10 @@ i18n._I18nManager.initialize(options.locale) -class ChandlerTimedRotatingFileHandler(logging.handlers.TimedRotatingFileHandler): +class ChandlerRotatingFileHandler(logging.handlers.RotatingFileHandler): def doRollover(self): self.stream.flush() - logging.handlers.TimedRotatingFileHandler.doRollover(self) + logging.handlers.RotatingFileHandler.doRollover(self) def initLogging(options): global logger @@ -480,8 +480,8 @@ # filemode='a') logger = logging.getLogger() - fileHandler = ChandlerTimedRotatingFileHandler(os.path.join(options.profileDir, 'chandler.log'), - when="midnight", backupCount=3) + logfile = os.path.join(options.profileDir, 'chandler.log') + fileHandler = ChandlerRotatingFileHandler(logfile, 'a', 5000000, 5) fileFormatter = logging.Formatter( '%(asctime)s %(name)s %(levelname)s: %(message)s'
_______________________________________________ Commits mailing list [email protected] http://lists.osafoundation.org/mailman/listinfo/commits
