Loger that buffers messages, and flush the last X messages, when a predefined severity message arrives