mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-16 00:45:48 +08:00
Merge pull request #813 from jwnimmer-tri/dist_sink_reset_v1.x
Add set_sinks method to dist_sink
This commit is contained in:
commit
9fda1cb421
@ -40,6 +40,12 @@ public:
|
|||||||
sinks_.erase(std::remove(sinks_.begin(), sinks_.end(), sink), sinks_.end());
|
sinks_.erase(std::remove(sinks_.begin(), sinks_.end(), sink), sinks_.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void set_sinks(std::vector<std::shared_ptr<sink>> sinks)
|
||||||
|
{
|
||||||
|
std::lock_guard<Mutex> lock(base_sink<Mutex>::mutex_);
|
||||||
|
sinks_ = std::move(sinks);
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void sink_it_(const details::log_msg &msg) override
|
void sink_it_(const details::log_msg &msg) override
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user