From bb4fa46ac10dd30b221661f2db2884fc11bfe13e Mon Sep 17 00:00:00 2001 From: Massimiliano Riva Date: Mon, 18 Mar 2024 14:26:15 +0100 Subject: [PATCH] Add comment to describe the use of mdc formatter --- include/spdlog/pattern_formatter-inl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index 5a86f5f1..ca835b01 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -868,6 +868,8 @@ private: memory_buf_t cached_datetime_; }; +// Class for formatting Mapped Diagnostic Context (MDC) in log messages. +// Example: [logger-name] [info] [mdc_key_1:mdc_value_1 mdc_key_2:mdc_value_2] some message template class mdc_formatter : public flag_formatter { public: