[New-bugs-announce] [issue6343] TimedRotatingFileHandler permission denied rename failure on Windows
Dale Nagata
report at bugs.python.org
Thu Jun 25 18:59:45 CEST 2009
New submission from Dale Nagata <nagata at telus.net>:
Traceback (most recent call last):
File "C:\python24\lib\logging\handlers.py", line 74, in emit
self.doRollover()
File "C:\python24\lib\logging\handlers.py", line 271, in doRollover
os.rename(self.baseFilename, dfn)
OSError: [Errno 13] Permission denied
originally hit on W2K3 but could not see evidence as it was running as a
service with stderr not going anywhere, but deeply suspicious since it
failed right at midnight each time.
whittled down to bare essentials, repro'd on XP running in console
window, test case will fail in 2 min when rollover is attempted
logging set up as follows:
def initlog():
#h = logging.handlers.TimedRotatingFileHandler( LOGFILEPATH,
'MIDNIGHT', 1, 7 )
h = logging.handlers.TimedRotatingFileHandler( LOGFILEPATH, 'M', 2, 7 )
h.setLevel( logging.DEBUG )
f = logging.Formatter( '%(asctime)s %(levelname)s %(message)s',
'%Y-%m-%d %H:%M:%S' )
h.setFormatter( f )
logging.root.addHandler( h )
logging.root.setLevel( logging.DEBUG )
searched issue tracker for TimedRotatingFileHandler, no hits
----------
components: Library (Lib)
files: testlog.py
messages: 89711
nosy: dnagata
severity: normal
status: open
title: TimedRotatingFileHandler permission denied rename failure on Windows
type: crash
versions: Python 2.4
Added file: http://bugs.python.org/file14365/testlog.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6343>
_______________________________________
More information about the New-bugs-announce
mailing list