diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-03-25 19:34:54 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-04-10 21:05:11 +0100 |
commit | 0c1ad0ff1a63e3f6ec2469faf38710091336e8b5 (patch) | |
tree | d3fac6850c3626140dc7366c7ad82813aa08c75f /external | |
parent | easylogging++: add categories (diff) | |
download | monero-0c1ad0ff1a63e3f6ec2469faf38710091336e8b5.tar.xz |
easylogging++: Print thread ID in a nicer way
Diffstat (limited to 'external')
-rw-r--r-- | external/easylogging++/easylogging++.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/external/easylogging++/easylogging++.h b/external/easylogging++/easylogging++.h index 98dcb0b5c..615314036 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 |