Package-level declarations

withLogContext(ctx) { } carries a LogContext in the coroutine context via LogContextElement. Read it with currentLogContext(), or bind it to a logger with Logger.withActiveLogContext().

withLogContext(ctx) { } carries a LogContext in the coroutine context via LogContextElement. Read it with currentLogContext(), or bind it to a logger with Logger.withActiveLogContext().

withLogContext(ctx) { } carries a LogContext in the coroutine context via LogContextElement. Read it with currentLogContext(), or bind it to a logger with Logger.withActiveLogContext().

withLogContext(ctx) { } carries a LogContext in the coroutine context via LogContextElement. Read it with currentLogContext(), or bind it to a logger with Logger.withActiveLogContext().

withLogContext(ctx) { } carries a LogContext in the coroutine context via LogContextElement. Read it with currentLogContext(), or bind it to a logger with Logger.withActiveLogContext().

withLogContext(ctx) { } carries a LogContext in the coroutine context via LogContextElement. Read it with currentLogContext(), or bind it to a logger with Logger.withActiveLogContext().

Types

Link copied to clipboard

A CoroutineContext.Element that carries a LogContext through a coroutine's lifetime.

A CoroutineContext.Element that carries a LogContext through a coroutine's lifetime.

A CoroutineContext.Element that carries a LogContext through a coroutine's lifetime.

A CoroutineContext.Element that carries a LogContext through a coroutine's lifetime.

Kotlin/Native implementation, shared by iOS, macOS, Linux, and MinGW.

A CoroutineContext.Element that carries a LogContext through a coroutine's lifetime.

Functions

Link copied to clipboard

The LogContext carried by the current coroutine, or an empty context if none is active.

Link copied to clipboard

Returns a Logger bound to the coroutine's active LogContext.

Link copied to clipboard
actual suspend fun <T> withLogContext(ctx: LogContext, block: suspend () -> T): T

Executes block with ctx merged into the active log context.

expect suspend fun <T> withLogContext(ctx: LogContext, block: suspend () -> T): T

Executes block with ctx merged into the active log context.

actual suspend fun <T> withLogContext(ctx: LogContext, block: suspend () -> T): T

JS implementation.

actual suspend fun <T> withLogContext(ctx: LogContext, block: suspend () -> T): T

Executes block with ctx merged into the active log context.

actual suspend fun <T> withLogContext(ctx: LogContext, block: suspend () -> T): T

Kotlin/Native implementation, shared by iOS, macOS, Linux, and MinGW.

actual suspend fun <T> withLogContext(ctx: LogContext, block: suspend () -> T): T

Wasm/JS implementation.