Package-level declarations

LogContext class for storing information in a coroutine scope.

Types

Link copied to clipboard
object Context

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

Link copied to clipboard
typealias ItemExtractor = () -> EventItems

Functional type that returns a map of event items.

Link copied to clipboard

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

Functions

Link copied to clipboard
suspend fun addToContext(vararg items: Pair<String, Any?>)

Adds zero or more items to the LogContext in the current coroutine scope.

Link copied to clipboard
suspend fun logContext(vararg items: Pair<String, Any?>): CoroutineContext

Utility function for constructing a LogContext with specified items.

Link copied to clipboard
suspend fun removeFromContext(vararg keys: String)

Removes zero or more items from the LogContext in the current coroutine scope.

Link copied to clipboard
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.