mirror of
https://github.com/gabime/spdlog.git
synced 2025-11-16 09:28:56 +08:00
Format
This commit is contained in:
@@ -72,7 +72,7 @@ inline void spdlog::logger::log(level::level_enum lvl, const char *fmt, const Ar
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
_err_handler("Unknown exception in logger " + _name);
|
||||
_err_handler("Unknown exception in logger " + _name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ inline void spdlog::logger::log(level::level_enum lvl, const char *msg)
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
_err_handler("Unknown exception in logger " + _name);
|
||||
_err_handler("Unknown exception in logger " + _name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ inline void spdlog::logger::log(level::level_enum lvl, const T &msg)
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
_err_handler("Unknown exception in logger " + _name);
|
||||
_err_handler("Unknown exception in logger " + _name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -151,8 +151,6 @@ public:
|
||||
return _msg_counter.load(std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private:
|
||||
std::atomic<size_t> _msg_counter; // total # of messages processed in this pool
|
||||
q_type _q;
|
||||
@@ -222,12 +220,12 @@ private:
|
||||
using std::chrono::milliseconds;
|
||||
|
||||
auto time_since_op = now - last_op_time;
|
||||
|
||||
|
||||
// yield upto 150 micros
|
||||
if (time_since_op <= microseconds(150))
|
||||
{
|
||||
return std::this_thread::yield();
|
||||
}
|
||||
}
|
||||
|
||||
// sleep for 20 ms upto 200 ms
|
||||
if (time_since_op <= milliseconds(200))
|
||||
|
||||
Reference in New Issue
Block a user