[issue18940] TimedRotatingFileHandler fails to doRollover if a logger has delay=True and no logs in that time.
New submission from Joshua Olson: In TimedRotatingFileHandler if you have a low volume logger than hasn't written to the log within the interval time doRollover will fail because there is no file to rotate. os.rename(self.baseFilename, dfn) should be something like if os.path.exists(self.base_fileName): os.rename(self.baseFilename, dfn I have included a unit test file. This test fails on 2.7.1 and 2.7.3. I have not tried 2.7.5. -- components: Library (Lib) files: logging_test.py messages: 197035 nosy: solarmist priority: normal severity: normal status: open title: TimedRotatingFileHandler fails to doRollover if a logger has delay=True and no logs in that time. versions: Python 2.7 Added file: http://bugs.python.org/file31620/logging_test.py ___ Python tracker <http://bugs.python.org/issue18940> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18941] RotatingFileHandler and TimedRotatingFileHandler do not respect delay on rollover
New submission from Joshua Olson: For low volume loggers RotatingFileHandler and TimedRotatingFileHandler will create possibly unnecessary files on doRollover, since they don't check the value of delay when opening the new self.stream. self.stream = self._open() should be something like if not self.delay: self.stream = self._open() -- messages: 197036 nosy: solarmist priority: normal severity: normal status: open title: RotatingFileHandler and TimedRotatingFileHandler do not respect delay on rollover ___ Python tracker <http://bugs.python.org/issue18941> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18940] TimedRotatingFileHandler fails to doRollover if a logger has delay=True and no logs in that time.
Joshua Olson added the comment: Here is a patch for the logging file from the cpython hg repo. -- keywords: +patch Added file: http://bugs.python.org/file31621/doRollover.patch ___ Python tracker <http://bugs.python.org/issue18940> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18940] TimedRotatingFileHandler fails to doRollover if a logger has delay=True and no logs in that time.
Changes by Joshua Olson : -- type: -> behavior ___ Python tracker <http://bugs.python.org/issue18940> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18940] TimedRotatingFileHandler fails to doRollover if a logger has delay=True and no logs in that time.
Changes by Joshua Olson : Removed file: http://bugs.python.org/file31620/logging_test.py ___ Python tracker <http://bugs.python.org/issue18940> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18940] TimedRotatingFileHandler fails to doRollover if a logger has delay=True and no logs in that time.
Changes by Joshua Olson : Removed file: http://bugs.python.org/file31621/doRollover.patch ___ Python tracker <http://bugs.python.org/issue18940> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18940] TimedRotatingFileHandler and RotatingFileHandler fail to doRollover if a logger has delay=True and no logs in that time.
Joshua Olson added the comment: This fixes the issue in both RotatingFilerHandler classes. -- title: TimedRotatingFileHandler fails to doRollover if a logger has delay=True and no logs in that time. -> TimedRotatingFileHandler and RotatingFileHandler fail to doRollover if a logger has delay=True and no logs in that time. Added file: http://bugs.python.org/file31622/doRollover.patch ___ Python tracker <http://bugs.python.org/issue18940> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18940] TimedRotatingFileHandler and RotatingFileHandler fail to doRollover if a logger has delay=True and no logs in that time.
Changes by Joshua Olson : Added file: http://bugs.python.org/file31623/logging_test.py ___ Python tracker <http://bugs.python.org/issue18940> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18941] RotatingFileHandler and TimedRotatingFileHandler do not respect delay on rollover
Joshua Olson added the comment: Demonstrate the bug -- Added file: http://bugs.python.org/file31624/logging_test.py ___ Python tracker <http://bugs.python.org/issue18941> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18941] RotatingFileHandler and TimedRotatingFileHandler do not respect delay on rollover
Joshua Olson added the comment: If delay is set then don't automatically open the new file. -- keywords: +patch Added file: http://bugs.python.org/file31625/delay_rollover.patch ___ Python tracker <http://bugs.python.org/issue18941> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com