LogContext

Container for objects to be stored in coroutine contexts and used in logging.

Types

Link copied to clipboard

Key used to retrieve the LogContext from the coroutine context.

Properties

Link copied to clipboard
open override val key: CoroutineContext.Key<*>

Functions

Link copied to clipboard
open override fun <R> fold(initial: R, operation: (R, CoroutineContext.Element) -> R): R
Link copied to clipboard
fun get(key: String): Any?

Retrieve an object from the LogContext.

open operator override fun <E : CoroutineContext.Element> get(key: CoroutineContext.Key<E>): E?
Link copied to clipboard

Get all objects from the LogContext as a map.

Link copied to clipboard
open override fun minusKey(key: CoroutineContext.Key<*>): CoroutineContext
Link copied to clipboard
open operator fun plus(context: CoroutineContext): CoroutineContext
Link copied to clipboard
open override fun toString(): String

Render the context as string with the number of items in it.