Refactred spdlog.h and console sinks. Added global lock for all console sinks (traits)

This commit is contained in:
gabime
2018-04-18 02:04:10 +03:00
parent 9bffa921ae
commit 924ef84241
7 changed files with 206 additions and 212 deletions

View File

@@ -148,8 +148,16 @@ public:
void drop_all()
{
std::lock_guard<Mutex> lock(_mutex);
_loggers.clear();
{
std::lock_guard<Mutex> lock(_mutex);
_loggers.clear();
}
{
std::lock_guard<Mutex> lock(_tp_mutex);
_tp.reset();
}
}
Mutex &tp_mutex()