Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging.handlers.RotatingFileHandler: implement "preserve log file name extension" feature #53935

Closed
desmondgc mannequin opened this issue Aug 31, 2010 · 3 comments
Closed
Assignees
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@desmondgc
Copy link
Mannequin

desmondgc mannequin commented Aug 31, 2010

BPO 9726
Nosy @vsajip

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/vsajip'
closed_at = <Date 2010-09-03.09:48:07.472>
created_at = <Date 2010-08-31.19:11:15.181>
labels = ['type-feature', 'library']
title = 'logging.handlers.RotatingFileHandler: implement "preserve log file name extension" feature'
updated_at = <Date 2010-09-03.09:48:07.471>
user = 'https://bugs.python.org/desmondgc'

bugs.python.org fields:

activity = <Date 2010-09-03.09:48:07.471>
actor = 'vinay.sajip'
assignee = 'vinay.sajip'
closed = True
closed_date = <Date 2010-09-03.09:48:07.472>
closer = 'vinay.sajip'
components = ['Library (Lib)']
creation = <Date 2010-08-31.19:11:15.181>
creator = 'desmondgc'
dependencies = []
files = []
hgrepos = []
issue_num = 9726
keywords = []
message_count = 3.0
messages = ['115272', '115360', '115429']
nosy_count = 2.0
nosy_names = ['vinay.sajip', 'desmondgc']
pr_nums = []
priority = 'normal'
resolution = 'wont fix'
stage = None
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue9726'
versions = ['Python 3.2']

@desmondgc
Copy link
Mannequin Author

desmondgc mannequin commented Aug 31, 2010

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.

@desmondgc desmondgc mannequin added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Aug 31, 2010
@vsajip
Copy link
Member

vsajip commented Sep 2, 2010

Only bug-fixes are supposed to go into 2.7, so reclassifying.

@vsajip vsajip self-assigned this Sep 2, 2010
@vsajip
Copy link
Member

vsajip commented Sep 3, 2010

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

@vsajip vsajip closed this as completed Sep 3, 2010
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant