From 3b4fd93bd0594f2ab449351a816efa78bf7043ac Mon Sep 17 00:00:00 2001 From: gabime Date: Tue, 30 Apr 2024 12:56:35 +0300 Subject: [PATCH] Updated comment about mdc --- include/spdlog/mdc.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/spdlog/mdc.h b/include/spdlog/mdc.h index 1713c820..41f0c1f3 100644 --- a/include/spdlog/mdc.h +++ b/include/spdlog/mdc.h @@ -1,3 +1,6 @@ +// Copyright(c) 2015-present, Gabi Melman & spdlog contributors. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) + #pragma once #include @@ -5,6 +8,13 @@ #include +// MDC is a simple map of key->string values stored in thread local storage whose content will be printed by the loggers. +// Note: Not supported in async mode (thread local storage - so the async thread pool have different copy). +// +// Usage example: +// spdlog::mdc::put("mdc_key_1", "mdc_value_1"); +// spdlog::info("Hello, {}", "World!"); // => [2024-04-26 02:08:05.040] [info] [mdc_key_1:mdc_value_1] Hello, World! + namespace spdlog { class SPDLOG_API mdc { public: