mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
Merge pull request #735 from jwnimmer-tri/dist_sink_reset
add remove_all_sinks method to dist_sink
This commit is contained in:
commit
c639483db0
@ -62,6 +62,12 @@ public:
|
||||
std::lock_guard<Mutex> lock(base_sink<Mutex>::_mutex);
|
||||
_sinks.erase(std::remove(_sinks.begin(), _sinks.end(), sink), _sinks.end());
|
||||
}
|
||||
|
||||
void remove_all_sinks()
|
||||
{
|
||||
std::lock_guard<Mutex> lock(base_sink<Mutex>::_mutex);
|
||||
_sinks.clear();
|
||||
}
|
||||
};
|
||||
|
||||
using dist_sink_mt = dist_sink<std::mutex>;
|
||||
|
Loading…
Reference in New Issue
Block a user