Commit b3881b9c authored by Jeremy Nimmer's avatar Jeremy Nimmer

add remove_all_sinks method to dist_sink

This allows users to set exactly the sinks they want, even if other
unknown application code has added bespoke sinks in the meantime.
parent 032035e7
......@@ -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>;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment