[issue33506] [logging] template for filename timestamps

Vinay Sajip report at bugs.python.org
Tue May 15 03:40:43 EDT 2018


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

> Are you planning to remove the predefined filename templates

No. They work fine as is for most people, from what I can tell.

> it still has the limitation that when a logging file is active for writing log events, that file always has the same filename (self.baseFilename)

That's not a limitation particularly, it's that way by design.

> So if I needed to implement logging with a filename of: foo-YYYYmmdd.log at all times

Implement your own subclass and do whatever you need in there, including deletion of oldest files etc. Publish it on PyPI and see what the uptake is like. I'm not sure a donation of code in this area will be accepted, but there's no need for your bespoke handler subclass to be in the stdlib.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33506>
_______________________________________


More information about the Python-bugs-list mailing list