mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-22 22:28:52 +00:00
easylogging++: Print thread ID in a nicer way
This commit is contained in:
parent
e7fabbd470
commit
0c1ad0ff1a
7
external/easylogging++/easylogging++.h
vendored
7
external/easylogging++/easylogging++.h
vendored
@ -1066,7 +1066,14 @@ static std::string getCurrentThreadId(void) {
|
|||||||
/// @brief Gets ID of currently running threading using std::this_thread::get_id()
|
/// @brief Gets ID of currently running threading using std::this_thread::get_id()
|
||||||
static std::string getCurrentThreadId(void) {
|
static std::string getCurrentThreadId(void) {
|
||||||
std::stringstream ss;
|
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 << std::this_thread::get_id();
|
||||||
|
ss.fill(prev_fill);
|
||||||
|
ss.flags(prev_flags);
|
||||||
|
ss.width(prev_width);
|
||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
# endif // !ELPP_USE_STD_THREADING
|
# endif // !ELPP_USE_STD_THREADING
|
||||||
|
Loading…
Reference in New Issue
Block a user