unilog.context
Provide a way to interact with Mapped Diagnostic Context
mdc-fn
macro
(mdc-fn & fntail)
Returns a function defined by the given fntail, which will install the same MDC context map in effect as in the thread at the time mdc-fn was called. This may be used to define a helper function which runs on a different thread, but needs to preserve the MDC context.
mdc-fn*
(mdc-fn* f)
Returns a function, which will install the same MDC context map in effect as in the thread at the time mdc-fn* was called and then call f with any given arguments. This may be used to define a helper function which runs on a different thread, but needs to preserve the MDC context.
with-context
macro
(with-context ctx & body)
Execute body with the Mapped Diagnostic Context updated from keys found in the ctx map.