scope

inline fun <T> LoggerScope.scope(name: String, body: LoggerScope.() -> T): T

Creates temporary sub-scope of current LoggerScope with custom name post-fixed to the new scope. The sub-scope is discarded once the body invocation is finished.

Return

The result of the body invocation.

Parameters

T

The result type of the scoped function.

name

Name of custom sub-scope.

body

Function which defines the sub-scope.