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 <rep...@bugs.python.org>
<http://bugs.python.org/issue18940>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to