withLogContext

suspend fun <R> withLogContext(vararg items: Pair<String, Any?>, 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