Fixed issue #833

This commit is contained in:
gabime 2018-09-26 15:43:23 +03:00
parent a74bbe7381
commit 7704e41336

View File

@ -62,7 +62,25 @@ protected:
void flush_() override
{
for (auto &sink : sinks_)
{
sink->flush();
}
}
void set_pattern_(const std::string &pattern) override
{
set_formatter_(spdlog::make_unique<spdlog::pattern_formatter>(pattern));
}
void set_formatter_(std::unique_ptr<spdlog::formatter> sink_formatter) override
{
base_sink<Mutex>::formatter_ = std::move(sink_formatter);
for (auto &sink : sinks_)
{
sink->set_formatter(base_sink<Mutex>::formatter_ ->clone());
}
}
std::vector<std::shared_ptr<sink>> sinks_;
};