debug: write threadid to trace output

This commit is contained in:
Danny Robson 2018-03-22 13:20:23 +11:00
parent 370488c498
commit d47f9e0cce

View File

@ -21,6 +21,7 @@
#include <algorithm>
#include <stdexcept>
#include <string>
#include <thread>
///////////////////////////////////////////////////////////////////////////////
@ -59,7 +60,7 @@
///////////////////////////////////////////////////////////////////////////////
#define TRACE { \
DEBUG_ONLY ( \
std::cerr << __FILE__ << ":" << __func__ << ":" << __LINE__ << std::endl; \
std::clog << "tid: " << std::this_thread::get_id () << "; " << __FILE__ << ":" << __func__ << ":" << __LINE__ << std::endl; \
); \
}