spdlog icon indicating copy to clipboard operation
spdlog copied to clipboard

Mapped Diagnostic Context

Open miqelm opened this issue 8 years ago • 4 comments

Have you ever thought about implementing Mapped Diagnostic Context? It's nice way to log information based on specifier %X{key}. There is map which translates this specified to given value, if given. https://logback.qos.ch/manual/mdc.html

miqelm avatar Oct 11 '17 12:10 miqelm

Is it something like this - #353 ?

gabime avatar Oct 11 '17 13:10 gabime

Yes, that's the same. I implemented this on my own, but not using shared_ptr to map. I used static thread_local field map in property_formatter to enable setting different propertied from different threads. And due to this solution, it works only using synchronous loggers.

miqelm avatar Oct 12 '17 05:10 miqelm

See proposition for implementation in pull request #534

miqelm avatar Oct 12 '17 12:10 miqelm

Can anyone please explain what is the state of this enhancement ? Also, will the enhancement is being planned for asynchronous loggers as well ?

SiteshSahoo avatar Dec 13 '19 08:12 SiteshSahoo