Context

object Context

Object for configuring context information that will be included in log events.

Functions

Link copied to clipboard
fun addBaseContext(vararg contextItems: Pair<String, Any?>)

Add one or more items to the base context, to be included in every log event.

Link copied to clipboard

Function to add a ContextItemExtractor that extracts an item map from a coroutine context element.

Link copied to clipboard

Add an ItemExtractor that will be used to add items to every log event.

Link copied to clipboard

Clear base context items.

Link copied to clipboard

Clear any ContextItemExtractor functions.

Link copied to clipboard

Clear any ItemExtractor functions.

Link copied to clipboard
fun removeBaseContext(vararg keys: String)

Remove one or more items from the base context so they are no longer included in every log event.