Updated comment about mdc

This commit is contained in:
gabime 2024-04-30 12:56:35 +03:00
parent 2122eb2194
commit 3b4fd93bd0

View File

@ -1,3 +1,6 @@
// Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once #pragma once
#include <map> #include <map>
@ -5,6 +8,13 @@
#include <spdlog/common.h> #include <spdlog/common.h>
// 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 { namespace spdlog {
class SPDLOG_API mdc { class SPDLOG_API mdc {
public: public: