Closed Bug 1030857 Opened 11 years ago Closed 4 years ago

logging.handlers.RotatingFileHandler needs replacement

Categories

(Testing Graveyard :: ActiveData, defect, P3)

x86_64
Windows 7
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: ekyle, Unassigned)

Details

logging.handlers.RotatingFileHandler is inelegant and prone to failure. Inelegant in that it simply appends ".NN" to the filename, resulting in the filetype suffix being lost in the name. Prone to failure because it does not have sufficient mitigation strategies in the case of accidentally locked files. > Traceback (most recent call last): > File "c:\PyPy27\lib-python\2.7\logging\handlers.py", line 78, in emit > self.doRollover() > File "c:\PyPy27\lib-python\2.7\logging\handlers.py", line 141, in > doRollover > os.rename(self.baseFilename, dfn) > WindowsError: [Error 32] The process cannot access the file because it > is being used by another process Make a new log writer that takes all the same parameters and writes logs in <filename><date>.<filetype> format to mitigate the locked file problem. And should the locked file problem happen, move to a new file.
Assignee: nobody → klahnakoski
Component: Metrics → ActiveData
Product: Datazilla → Testing
No longer blocks: 962378
Assignee: klahnakoski → nobody
Priority: -- → P3
This component is no longer maintained so closing as WONTFIX
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.