From 8ecef777d26507984d11d0cb5af3eb292cf5ae6a Mon Sep 17 00:00:00 2001
From: Jeremie Deray <jeremie.deray@pal-robotics.com>
Date: Sat, 15 Oct 2016 14:19:26 +0200
Subject: [PATCH] multi-thread print also prints thread id

---
 src/multi_threading_utils.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/multi_threading_utils.h b/src/multi_threading_utils.h
index 61c2f93ea..ed904610b 100644
--- a/src/multi_threading_utils.h
+++ b/src/multi_threading_utils.h
@@ -135,7 +135,8 @@ template <typename... Args>
 inline void locked_cout(const CoutColor& color, const Args&... rest)
 {
   std::lock_guard<std::mutex> lock_cout{details::the_infamous_cout_mutex};
-  std::cout << color << details::printTime() << " ";
+  std::cout << color << "[thread " << core::get_thread_id()
+            << "]" << details::printTime() << " ";
 
   details::cout_impl(rest...);
 }
-- 
GitLab