mirror of
https://github.com/gabime/spdlog.git
synced 2025-11-16 09:28:56 +08:00
astyle
This commit is contained in:
@@ -316,7 +316,7 @@ inline size_t _thread_id()
|
||||
inline size_t thread_id()
|
||||
{
|
||||
static thread_local const size_t tid = _thread_id();
|
||||
return tid;
|
||||
return tid;
|
||||
}
|
||||
|
||||
|
||||
@@ -364,7 +364,7 @@ inline std::string errno_str(int err_num)
|
||||
#endif
|
||||
}
|
||||
|
||||
inline int pid()
|
||||
inline int pid()
|
||||
{
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
@@ -365,12 +365,12 @@ class t_formatter:public flag_formatter
|
||||
}
|
||||
};
|
||||
|
||||
// Current pid
|
||||
// Current pid
|
||||
class pid_formatter:public flag_formatter
|
||||
{
|
||||
void format(details::log_msg& msg, const std::tm&) override
|
||||
{
|
||||
msg.formatted << details::os::pid();
|
||||
msg.formatted << details::os::pid();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -507,7 +507,7 @@ inline void spdlog::pattern_formatter::handle_flag(char flag)
|
||||
{
|
||||
switch (flag)
|
||||
{
|
||||
// logger name
|
||||
// logger name
|
||||
case 'n':
|
||||
_formatters.push_back(std::unique_ptr<details::flag_formatter>(new details::name_formatter()));
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user