From 50e8b2d982e40266f61b9a0d023c008322c650cb Mon Sep 17 00:00:00 2001 From: zydxhs Date: Tue, 22 Nov 2022 15:38:01 +0800 Subject: [PATCH] fix dup_filter_sink lose source_loc (#2549) Co-authored-by: zhuyadong --- include/spdlog/sinks/dup_filter_sink.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spdlog/sinks/dup_filter_sink.h b/include/spdlog/sinks/dup_filter_sink.h index 282163ae..1a4fb348 100644 --- a/include/spdlog/sinks/dup_filter_sink.h +++ b/include/spdlog/sinks/dup_filter_sink.h @@ -67,7 +67,7 @@ protected: auto msg_size = ::snprintf(buf, sizeof(buf), "Skipped %u duplicate messages..", static_cast(skip_counter_)); if (msg_size > 0 && static_cast(msg_size) < sizeof(buf)) { - details::log_msg skipped_msg{msg.logger_name, level::info, string_view_t{buf, static_cast(msg_size)}}; + details::log_msg skipped_msg{msg.source, msg.logger_name, level::info, string_view_t{buf, static_cast(msg_size)}}; dist_sink::sink_it_(skipped_msg); } }