refactoring: Masive refactor to build the V2
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package eventDemo.contexts.game.application.logging
|
||||
|
||||
import io.github.oshai.kotlinlogging.withLoggingContext
|
||||
|
||||
inline fun <T> withLoggingContext(
|
||||
vararg pair: Pair<LoggingContextKeys, *>,
|
||||
body: () -> T,
|
||||
): T =
|
||||
withLoggingContext(
|
||||
*pair
|
||||
.map {
|
||||
it.first.name to it.second.toString()
|
||||
}.toTypedArray(),
|
||||
restorePrevious = true,
|
||||
body = body,
|
||||
)
|
||||
|
||||
// inline fun withLoggingContext(
|
||||
// vararg pair: Pair<LoggingContextKeys, *>,
|
||||
// body: () -> Unit,
|
||||
// ) =
|
||||
// withLoggingContext(
|
||||
// *pair
|
||||
// .map {
|
||||
// it.first.name to it.second.toString()
|
||||
// }.toTypedArray(),
|
||||
// restorePrevious = true,
|
||||
// body = body,
|
||||
// )
|
||||
Reference in New Issue
Block a user