mirror of
https://github.com/gabime/spdlog.git
synced 2025-02-04 19:56:46 +08:00
use size_t to better represent thread id across platforms
This commit is contained in:
parent
7105fdadf9
commit
0684b4f378
@ -59,6 +59,7 @@ using log_clock = std::chrono::system_clock;
|
||||
using sink_ptr = std::shared_ptr < sinks::sink > ;
|
||||
using sinks_init_list = std::initializer_list < sink_ptr > ;
|
||||
using formatter_ptr = std::shared_ptr<spdlog::formatter>;
|
||||
using thread_id = std::size_t;
|
||||
|
||||
//Log level enum
|
||||
namespace level
|
||||
|
@ -59,7 +59,7 @@ class async_log_helper
|
||||
std::string logger_name;
|
||||
level::level_enum level;
|
||||
log_clock::time_point time;
|
||||
uint64_t thread_id;
|
||||
thread_id thread_id;
|
||||
std::string txt;
|
||||
|
||||
async_msg() = default;
|
||||
|
@ -92,7 +92,7 @@ struct log_msg
|
||||
std::string logger_name;
|
||||
level::level_enum level;
|
||||
log_clock::time_point time;
|
||||
uint64_t thread_id;
|
||||
thread_id thread_id;
|
||||
fmt::MemoryWriter raw;
|
||||
fmt::MemoryWriter formatted;
|
||||
};
|
||||
|
@ -172,7 +172,7 @@ inline int utc_minutes_offset(const std::tm& tm = details::os::localtime())
|
||||
}
|
||||
|
||||
//Return current thread id as 64 bit integer
|
||||
inline uint64_t thread_id()
|
||||
inline size_t thread_id()
|
||||
{
|
||||
|
||||
#ifdef _WIN32
|
||||
|
Loading…
Reference in New Issue
Block a user