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.

Author vinay.sajip
Recipients kh14821, rhettinger, vinay.sajip
Date 2021-03-01.15:13:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1614611607.82.0.732318865366.issue43344@roundup.psfhosted.org>
In-reply-to
Content
As per the documentation at

https://docs.python.org/3/library/logging.handlers.html#logging.handlers.BaseRotatingHandler.namer

You can set the handler's "namer" attribute to a callable that returns a computed name for the rotated file - this can be computed as per your requirements. The cookbook also has an entry about this:

https://docs.python.org/3/howto/logging-cookbook.html#using-a-rotator-and-namer-to-customize-log-rotation-processing
History
Date User Action Args
2021-03-01 15:13:27vinay.sajipsetrecipients: + vinay.sajip, rhettinger, kh14821
2021-03-01 15:13:27vinay.sajipsetmessageid: <1614611607.82.0.732318865366.issue43344@roundup.psfhosted.org>
2021-03-01 15:13:27vinay.sajiplinkissue43344 messages
2021-03-01 15:13:27vinay.sajipcreate