mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 10:01:33 +08:00
Fixed issue #833
This commit is contained in:
parent
a74bbe7381
commit
7704e41336
@ -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_;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user