From 0c1ad0ff1a63e3f6ec2469faf38710091336e8b5 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 25 Mar 2017 19:34:54 +0000 Subject: [PATCH] easylogging++: Print thread ID in a nicer way --- external/easylogging++/easylogging++.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/external/easylogging++/easylogging++.h b/external/easylogging++/easylogging++.h index 98dcb0b5..61531403 100644 --- a/external/easylogging++/easylogging++.h +++ b/external/easylogging++/easylogging++.h @@ -1066,7 +1066,14 @@ static std::string getCurrentThreadId(void) { /// @brief Gets ID of currently running threading using std::this_thread::get_id() static std::string getCurrentThreadId(void) { std::stringstream ss; + char prev_fill = ss.fill(' '); + auto prev_flags = ss.flags(std::ios::hex); + //ss.setf(std::ios::hex); + auto prev_width = ss.width(16); ss << std::this_thread::get_id(); + ss.fill(prev_fill); + ss.flags(prev_flags); + ss.width(prev_width); return ss.str(); } # endif // !ELPP_USE_STD_THREADING