mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-27 07:14:12 +08:00
Updated comment about mdc
This commit is contained in:
parent
2122eb2194
commit
3b4fd93bd0
@ -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 <map>
|
||||
@ -5,6 +8,13 @@
|
||||
|
||||
#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 {
|
||||
class SPDLOG_API mdc {
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user