Set the Mapped Diagnostic Context
for the thread and execute the block f.
Set the Mapped Diagnostic Context
for the thread and execute the block f.
Upon return, the MDC is cleared of the values passed (any MDC values that existed prior to this call remains).
This function, if set, will be called before any loggers are created.
Provides some helpers to easily create
Loggerinstances.For example:
It can also be used to provide global setup for loggers created this way:
Last but not least, you can wrap chunks of code with particular Mapped Diagnostic Context values: