Liking cljdoc? Tell your friends :D

io.aviso.logging.mdc

Allows arbitrary keys and values to be added to the event MDC.

Allows arbitrary keys and values to be added to the event MDC.
raw docstring

*extra-mdc*clj

May contain a map of extra values to add to the logging MDC (message diagnostic context).

The keys of the map are converted to string (via clojure.core/name). The values of the map are converted to string via .toString(); null values are not added to the MDC.

Note: the appender adds values to the MDC, which is stored as a mutable value by Logback. Values stored into the MDC may "stick" in the per-thread MDC data and be visible in later logging, even after exiting the with-mdc block.

For best results, invoke set-mdc-default at application startup, setting a default for each key that may later be added to the MDC by a call to with-mdc.

May contain a map of extra values to add to the logging MDC (message diagnostic context).

The keys of the map are converted to string (via clojure.core/name).  The values of the map
are converted to string via .toString(); null values are not added to the MDC.

Note: the appender adds values to the MDC, which is stored as a mutable value by Logback.
Values stored into the MDC may "stick" in the per-thread MDC data and be visible in
later logging, even after exiting the [[with-mdc]] block.

For best results, invoke [[set-mdc-default]] at application startup, setting
a default for each key that may later be added to the MDC
by a call to [[with-mdc]].
sourceraw docstring

set-mdc-defaultclj

(set-mdc-default defaults)

Alters the root value for the *extra-mdc* var, merging keys and values.

Each key is converted to a string using name.

The value is usually an empty string.

This ensures that MDC set by with-mdc doesn't leak out into subsequent logging on the same thread.

Alters the root value for the [[*extra-mdc*]] var, merging keys and values.

Each key is converted to a string using `name`.

The value is usually an empty string.

This ensures that MDC set by [[with-mdc]] doesn't leak out into subsequent
logging on the same thread.
sourceraw docstring

to-string-keysclj

(to-string-keys m)
source

with-mdccljmacro

(with-mdc mdc-values & body)

Binds a map key/value pair into *extra-mdc* before evaluating the body.

Binds a map key/value pair into [[*extra-mdc*]] before evaluating the body.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close