This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: logging.handlers.RotatingFileHandler: implement "preserve log file name extension" feature
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.2
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: vinay.sajip Nosy List: desmondgc, vinay.sajip
Priority: normal Keywords:

Created on 2010-08-31 19:11 by desmondgc, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg115272 - (view) Author: Desmond Cox (desmondgc) Date: 2010-08-31 19:11
See https://issues.apache.org/jira/browse/LOG4NET-64 - "[PATCH] to RollingFileAppender.cs to add the ability to preserve the log file name extension when rolling the log file."

Currently, rollover appends a numeric extension to the base file name. E.g.:

app.log
app.log.1
app.log.2

Consider adding an option to preserve the log file name extension. E.g.:

app.log
app.1.log
app.2.log

This maintains file associations in Windows, most notably.
msg115360 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2010-09-02 05:57
Only bug-fixes are supposed to go into 2.7, so reclassifying.
msg115429 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2010-09-03 09:48
You can do this by subclassing RotatingFileHandler and overriding doRollover, as per this example:

http://plumberjack.blogspot.com/2010/09/using-custom-file-naming-scheme-for.html
History
Date User Action Args
2022-04-11 14:57:05adminsetgithub: 53935
2010-09-03 09:48:07vinay.sajipsetstatus: open -> closed
resolution: wont fix
messages: + msg115429
2010-09-02 05:57:21vinay.sajipsetversions: + Python 3.2, - Python 2.7
nosy: + vinay.sajip

messages: + msg115360

assignee: vinay.sajip
2010-08-31 19:11:15desmondgccreate