Message252594
This is already supported. There is a logging.handlers.MemoryHandler which allows you to buffer logging events and then pass the buffered events to another handler when some condition is met, such as e.g. buffer full or some severity threshold is exceeded. Flushing the buffer to the other handler can be customised by subclassing and overriding shouldFlush() and perhaps flush() methods.
https://docs.python.org/2/library/logging.handlers.html#memoryhandler
I can perhaps add a cookbook recipe to illustrate, so I'll leave this issue open for now, as a reminder. |
|
Date |
User |
Action |
Args |
2015-10-09 07:25:38 | vinay.sajip | set | recipients:
+ vinay.sajip, rhettinger, r.david.murray, azsorkin, dasilver@cisco.com |
2015-10-09 07:25:38 | vinay.sajip | set | messageid: <1444375538.29.0.791472793558.issue25344@psf.upfronthosting.co.za> |
2015-10-09 07:25:38 | vinay.sajip | link | issue25344 messages |
2015-10-09 07:25:38 | vinay.sajip | create | |
|