withLogContext

suspend fun <R> withLogContext(vararg items: ContextItem, block: suspend CoroutineScope.() -> R): R

Utility function that stores items into a LogContext in the current coroutine scope.

Return

the value returned by block

Parameters

items

context items to include in the context

block

lambda that runs in the scope