Ringbuffer logger
Have a ringbuffer logger that puts messages to memory and outputs them either on request or on big problems (exception killing a thread, segfault…).
Think about performance ‒ if it is to be turned on by default, on what level, if we would have one buffer for each thread or shared, etc.
This'll help debugging problems, like #2.