diff --git a/src/wasmJsMain/kotlin/io/github/oshai/kotlinlogging/internal/KLoggerNameResolver.kt b/src/wasmJsMain/kotlin/io/github/oshai/kotlinlogging/internal/KLoggerNameResolver.kt index ff6e37d..412831c 100644 --- a/src/wasmJsMain/kotlin/io/github/oshai/kotlinlogging/internal/KLoggerNameResolver.kt +++ b/src/wasmJsMain/kotlin/io/github/oshai/kotlinlogging/internal/KLoggerNameResolver.kt @@ -18,10 +18,8 @@ internal actual object KLoggerNameResolver { } private fun getInvokingClass(line: String): String { - return topLevelPropertyRegex.find(line)?.let { - it.groupValues[1].split(".").last() - } ?: classPropertyRegex.find(line)?.let { - it.groupValues[1].split(".").last() - } ?: NO_CLASS + return topLevelPropertyRegex.find(line)?.let { it.groupValues[1].split(".").last() } + ?: classPropertyRegex.find(line)?.let { it.groupValues[1].split(".").last() } + ?: NO_CLASS } } diff --git a/src/wasmJsTest/kotlin/io/github/oshai/kotlinlogging/SimpleWasmJsTest.kt b/src/wasmJsTest/kotlin/io/github/oshai/kotlinlogging/SimpleWasmJsTest.kt index a462969..8a762fd 100644 --- a/src/wasmJsTest/kotlin/io/github/oshai/kotlinlogging/SimpleWasmJsTest.kt +++ b/src/wasmJsTest/kotlin/io/github/oshai/kotlinlogging/SimpleWasmJsTest.kt @@ -3,11 +3,11 @@ package io.github.oshai.kotlinlogging import kotlin.test.* private val namedLogger = KotlinLogging.logger("SimpleWasmJsTest") -private val anonymousFilePropLogger = KotlinLogging.logger { } +private val anonymousFilePropLogger = KotlinLogging.logger {} class SimpleWasmJsTest { private lateinit var appender: SimpleAppender - private val anonymousClassPropLogger = KotlinLogging.logger { } + private val anonymousClassPropLogger = KotlinLogging.logger {} @BeforeTest fun setup() {