Vinay Sajip added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25344>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to