easylogging++: Print thread ID in a nicer way
This commit is contained in:
parent
2a0bf7834c
commit
ec71ce8d2d
3
external/easylogging++/easylogging++.h
vendored
3
external/easylogging++/easylogging++.h
vendored
@ -363,6 +363,7 @@ ELPP_INTERNAL_DEBUGGING_OUT_INFO << ELPP_INTERNAL_DEBUGGING_MSG(internalInfoStre
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <iomanip>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#if ELPP_THREADING_ENABLED
|
#if ELPP_THREADING_ENABLED
|
||||||
@ -1079,7 +1080,7 @@ namespace el {
|
|||||||
/// @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 inline std::string getCurrentThreadId(void) {
|
static inline std::string getCurrentThreadId(void) {
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << std::this_thread::get_id();
|
ss << std::setfill(' ') << std::setw(16) << std::hex << std::this_thread::get_id();
|
||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
static inline void msleep(int ms) {
|
static inline void msleep(int ms) {
|
||||||
|
Loading…
Reference in New Issue
Block a user