Skip to content

Thread local MDC #426

Answered by odygrd
cchapman-kxs asked this question in Q&A
Discussion options

You must be logged in to vote

It's challenging to implement this feature due to the library's design constraints. The format string, such as Start operation... [property_1: {}, property_2: {}] cannot be a runtime string, making it difficult to dynamically add properties as the number of the properties needs to be known at compile time. Furthermore, since all formatting in this library occurs asynchronously on the backend thread, we must ensure that the added property remains unchanged or take a copy of all properties for each logged message.

As a result, this feature is not currently supported. An alternative approach is to pass the id with each log statement.

I'll explore the possibility of adding this functionality …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by cchapman-kxs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants