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: "suffix" attribute not documented in logging.TimedRotatingFileHandler
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: NobilisVir, SilentGhost, docs@python, vinay.sajip
Priority: normal Keywords:

Created on 2015-09-24 09:34 by NobilisVir, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg251503 - (view) Author: NobilisVir (NobilisVir) Date: 2015-09-24 09:34
The suffix attribute that controls the timestamp portion that gets appended to the file name is not documented (but it would be very useful to be). The documentation is here - https://docs.python.org/2/library/logging.handlers.html#timedrotatingfilehandler

I learned about this attribute from an SO answer after searching for a solution to how to control the file name (this answer - http://stackoverflow.com/a/338566/1006955).
msg259783 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2016-02-07 11:33
It isn't documented because it's an internal attribute. If it did work for someone, it's by accident. Naturally, Vinay would have to make a final judgement regarding this, but I'd be inclined to close as not a bug.
msg259798 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2016-02-07 18:49
It's not documented, and not intended to be changeable by the user, because it is not set to a fixed value - the value depends on the "when" (to rollover) and "interval" arguments to the handler initializer. If you really need to have functionality other than the default, the way to do this is by creating a subclass and changing its behaviour appropriately.

IMO the accepted SO answer you linked to doesn't give correct advice.
History
Date User Action Args
2022-04-11 14:58:21adminsetgithub: 69413
2016-02-07 19:13:37SilentGhostsetstage: resolved
2016-02-07 18:49:50vinay.sajipsetstatus: open -> closed
resolution: not a bug
messages: + msg259798
2016-02-07 11:33:30SilentGhostsetnosy: + SilentGhost
messages: + msg259783
2016-02-07 05:59:29ned.deilysetnosy: + vinay.sajip
2015-09-24 09:34:38NobilisVircreate