ThreadSafePrinter Single header library is designed mainly for debugging multi threaded code using std::cout by default. To use it just copy lib/ThreadSafePrinter.hpp to your project. You can find usage examples in examples/simple.cpp.