Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapped Diagnostic Context #532

Closed
miqelm opened this issue Oct 11, 2017 · 5 comments
Closed

Mapped Diagnostic Context #532

miqelm opened this issue Oct 11, 2017 · 5 comments

Comments

@miqelm
Copy link

miqelm commented Oct 11, 2017

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

@gabime
Copy link
Owner

gabime commented Oct 11, 2017

Is it something like this - #353 ?

@miqelm
Copy link
Author

miqelm commented Oct 12, 2017

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
Copy link
Author

miqelm commented Oct 12, 2017

See proposition for implementation in pull request #534

@SiteshSahoo
Copy link

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

bachittle pushed a commit to bachittle/spdlog that referenced this issue Dec 22, 2022
@gabime
Copy link
Owner

gabime commented Apr 26, 2024

implemented in #2907

@gabime gabime closed this as completed Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants