diff --git a/include/spdlog/sinks/dist_sink.h b/include/spdlog/sinks/dist_sink.h index 8fccb4ee5..065048ad4 100644 --- a/include/spdlog/sinks/dist_sink.h +++ b/include/spdlog/sinks/dist_sink.h @@ -57,20 +57,20 @@ class dist_sink : public base_sink protected: void sink_it_(const details::log_msg &msg) override { - for (auto &sink : sinks_) + for (auto &sub_sink : sinks_) { - if (sink->should_log(msg.level)) + if (sub_sink->should_log(msg.level)) { - sink->log(msg); + sub_sink->log(msg); } } } void flush_() override { - for (auto &sink : sinks_) + for (auto &sub_sink : sinks_) { - sink->flush(); + sub_sink->flush(); } } @@ -82,9 +82,9 @@ class dist_sink : public base_sink void set_formatter_(std::unique_ptr sink_formatter) override { base_sink::formatter_ = std::move(sink_formatter); - for (auto &sink : sinks_) + for (auto &sub_sink : sinks_) { - sink->set_formatter(base_sink::formatter_->clone()); + sub_sink->set_formatter(base_sink::formatter_->clone()); } } std::vector> sinks_;