mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 18:41:35 +08:00
Update README.md
This commit is contained in:
parent
8d6a121b73
commit
aefd4510c3
10
README.md
10
README.md
@ -197,13 +197,9 @@ It is a map of key-value pairs that can be set on a per-thread basis since it is
|
||||
```c++
|
||||
#include "spdlog/spdlog.h"
|
||||
#include "spdlog/mdc"
|
||||
{
|
||||
spdlog::mdc::put("key1", "value1");
|
||||
spdlog::mdc::put("key2", "value2");
|
||||
// use the %& formatter flag to print all MDC values
|
||||
spdlog::set_pattern("[%H:%M:%S %z] [%^%L%$] [%&] %v");
|
||||
spdlog::info("Some log message with context");
|
||||
}
|
||||
...
|
||||
spdlog::mdc::put("key1", "value1");
|
||||
spdlog::mdc::put("key2", "value2");
|
||||
```
|
||||
|
||||
---
|
||||
|
Loading…
Reference in New Issue
Block a user