diff --git a/coupling-plugins/gradle/libs.versions.toml b/coupling-plugins/gradle/libs.versions.toml index db76a21c45..2e29c08653 100644 --- a/coupling-plugins/gradle/libs.versions.toml +++ b/coupling-plugins/gradle/libs.versions.toml @@ -7,8 +7,8 @@ org-jlleitschuh-gradle-ktlint = "11.0.0" [libraries] com-fasterxml-jackson-core-jackson-databind = "com.fasterxml.jackson.core:jackson-databind:2.15.2" com-github-ben-manes-gradle-versions-plugin = "com.github.ben-manes:gradle-versions-plugin:0.47.0" -com-zegreatrob-jsmints-jsmints-bom = "com.zegreatrob.jsmints:jsmints-bom:4.3.21" -com-zegreatrob-testmints-testmints-bom = "com.zegreatrob.testmints:testmints-bom:10.1.7" +com-zegreatrob-jsmints-jsmints-bom = "com.zegreatrob.jsmints:jsmints-bom:4.3.24" +com-zegreatrob-testmints-testmints-bom = "com.zegreatrob.testmints:testmints-bom:10.1.8" com-zegreatrob-tools-tools-bom = "com.zegreatrob.tools:tools-bom:0.5.7" org-ajoberstar-grgit-gradle-plugin = "org.ajoberstar.grgit:org.ajoberstar.grgit.gradle.plugin:5.0.0" org-apache-logging-log4j-log4j-core = { module = "org.apache.logging.log4j:log4j-core", version.ref = "org-apache-logging-log4j" } diff --git a/e2e/build.gradle.kts b/e2e/build.gradle.kts index 8eb0830b8c..c06d629859 100644 --- a/e2e/build.gradle.kts +++ b/e2e/build.gradle.kts @@ -38,7 +38,7 @@ dependencies { jsE2eTestImplementation("com.zegreatrob.testmints:async") jsE2eTestImplementation("com.zegreatrob.testmints:minassert") jsE2eTestImplementation("com.zegreatrob.testmints:standard") - jsE2eTestImplementation("io.github.microutils:kotlin-logging") + jsE2eTestImplementation("io.github.oshai:kotlin-logging") jsE2eTestImplementation("io.ktor:ktor-client-content-negotiation") jsE2eTestImplementation("io.ktor:ktor-client-core") jsE2eTestImplementation("io.ktor:ktor-client-logging") diff --git a/e2e/src/jsE2eTest/kotlin/com/zegreatrob/coupling/e2e/test/AuthorizedKtor.kt b/e2e/src/jsE2eTest/kotlin/com/zegreatrob/coupling/e2e/test/AuthorizedKtor.kt index 77e6e9f052..3852aecad3 100644 --- a/e2e/src/jsE2eTest/kotlin/com/zegreatrob/coupling/e2e/test/AuthorizedKtor.kt +++ b/e2e/src/jsE2eTest/kotlin/com/zegreatrob/coupling/e2e/test/AuthorizedKtor.kt @@ -2,6 +2,7 @@ package com.zegreatrob.coupling.e2e.test import com.zegreatrob.coupling.sdk.couplingSdk import com.zegreatrob.coupling.sdk.defaultClient +import io.github.oshai.kotlinlogging.KotlinLogging import io.ktor.client.HttpClient import io.ktor.client.call.body import io.ktor.client.plugins.contentnegotiation.ContentNegotiation @@ -15,7 +16,6 @@ import io.ktor.http.Url import io.ktor.serialization.kotlinx.json.json import kotlinx.serialization.json.JsonObject import kotlinx.serialization.json.jsonPrimitive -import mu.KotlinLogging external val process: dynamic diff --git a/e2e/src/jsE2eTest/kotlin/com/zegreatrob/coupling/e2e/test/Main.kt b/e2e/src/jsE2eTest/kotlin/com/zegreatrob/coupling/e2e/test/Main.kt index 2802938a2a..086f7ba061 100644 --- a/e2e/src/jsE2eTest/kotlin/com/zegreatrob/coupling/e2e/test/Main.kt +++ b/e2e/src/jsE2eTest/kotlin/com/zegreatrob/coupling/e2e/test/Main.kt @@ -2,7 +2,7 @@ package com.zegreatrob.coupling.e2e.test import com.zegreatrob.coupling.logging.JsonFormatter import com.zegreatrob.coupling.testlogging.JsonLoggingTestMintsReporter -import mu.KotlinLoggingConfiguration +import io.github.oshai.kotlinlogging.KotlinLoggingConfiguration fun main() { KotlinLoggingConfiguration.FORMATTER = JsonFormatter() diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9493198b55..7933b12feb 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,9 +2,9 @@ com-benasher44-uuid = "com.benasher44:uuid:0.7.1" com-fasterxml-jackson-core-jackson-databind = "com.fasterxml.jackson.core:jackson-databind:2.15.2" com-github-ajalt-clikt-clikt = "com.github.ajalt.clikt:clikt:4.1.0" -com-zegreatrob-jsmints-jsmints-bom = "com.zegreatrob.jsmints:jsmints-bom:4.3.21" -com-zegreatrob-testmints-testmints-bom = "com.zegreatrob.testmints:testmints-bom:10.1.7" -io-github-microutils-kotlin-logging = "io.github.microutils:kotlin-logging:3.0.5" +com-zegreatrob-jsmints-jsmints-bom = "com.zegreatrob.jsmints:jsmints-bom:4.3.24" +com-zegreatrob-testmints-testmints-bom = "com.zegreatrob.testmints:testmints-bom:10.1.8" +io-github-oshai-kotlin-logging = "io.github.oshai:kotlin-logging:5.0.0" io-ktor-ktor-bom = "io.ktor:ktor-bom:2.3.2" org-jetbrains-kotlin-wrappers-kotlin-wrappers-bom = "org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:1.0.0-pre.598" org-jetbrains-kotlinx-kotlinx-coroutines-bom = "org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.7.2" diff --git a/libraries/action/build.gradle.kts b/libraries/action/build.gradle.kts index aa3a73e166..2a0fecb0c2 100644 --- a/libraries/action/build.gradle.kts +++ b/libraries/action/build.gradle.kts @@ -28,7 +28,6 @@ dependencies { commonMainImplementation("org.jetbrains.kotlin:kotlin-stdlib-common") commonMainImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-core") commonMainImplementation("com.benasher44:uuid") - commonMainImplementation("io.github.microutils:kotlin-logging") commonTestImplementation(project(":libraries:json")) commonTestImplementation(project(":libraries:stub-model")) @@ -41,7 +40,6 @@ dependencies { commonTestImplementation("com.zegreatrob.testmints:minassert") "jvmMainImplementation"(kotlin("reflect")) - "jvmMainImplementation"("io.github.microutils:kotlin-logging") "jvmMainImplementation"("com.fasterxml.jackson.core:jackson-databind") "jvmTestImplementation"(kotlin("reflect")) diff --git a/libraries/action/src/commonMain/kotlin/com/zegreatrob/coupling/action/LoggingActionPipe.kt b/libraries/action/src/commonMain/kotlin/com/zegreatrob/coupling/action/LoggingActionPipe.kt index b45f7bd9a6..ea1e926656 100644 --- a/libraries/action/src/commonMain/kotlin/com/zegreatrob/coupling/action/LoggingActionPipe.kt +++ b/libraries/action/src/commonMain/kotlin/com/zegreatrob/coupling/action/LoggingActionPipe.kt @@ -3,7 +3,7 @@ package com.zegreatrob.coupling.action import com.benasher44.uuid.Uuid import com.zegreatrob.testmints.action.ActionPipe import com.zegreatrob.testmints.action.async.SuspendAction -import mu.KotlinLogging +import io.github.oshai.kotlinlogging.KotlinLogging private val theLogger by lazy { KotlinLogging.logger("ActionLogger") } diff --git a/libraries/action/src/commonMain/kotlin/com/zegreatrob/coupling/action/LoggingProvider.kt b/libraries/action/src/commonMain/kotlin/com/zegreatrob/coupling/action/LoggingProvider.kt index 425bebe139..7d71297698 100644 --- a/libraries/action/src/commonMain/kotlin/com/zegreatrob/coupling/action/LoggingProvider.kt +++ b/libraries/action/src/commonMain/kotlin/com/zegreatrob/coupling/action/LoggingProvider.kt @@ -1,6 +1,6 @@ package com.zegreatrob.coupling.action -import mu.KLogger +import io.github.oshai.kotlinlogging.KLogger interface LoggingProvider { val logger: KLogger diff --git a/libraries/dependency-bom/build.gradle.kts b/libraries/dependency-bom/build.gradle.kts index c565d05787..9a9258fe10 100644 --- a/libraries/dependency-bom/build.gradle.kts +++ b/libraries/dependency-bom/build.gradle.kts @@ -24,7 +24,7 @@ dependencies { constraints { api(libs.com.benasher44.uuid) api(libs.com.fasterxml.jackson.core.jackson.databind) - api(libs.io.github.microutils.kotlin.logging) + api(libs.io.github.oshai.kotlin.logging) api(libs.org.jetbrains.kotlinx.kotlinx.datetime) api(libs.org.slf4j.slf4j.simple) api(libs.org.kotools.types) diff --git a/libraries/logging/build.gradle.kts b/libraries/logging/build.gradle.kts index cad82cdac7..f5674d716b 100644 --- a/libraries/logging/build.gradle.kts +++ b/libraries/logging/build.gradle.kts @@ -9,9 +9,7 @@ kotlin { } } dependencies { - commonMainImplementation("org.jetbrains.kotlin:kotlin-stdlib-common") - commonMainImplementation("io.github.microutils:kotlin-logging") + commonMainApi("io.github.oshai:kotlin-logging") commonMainImplementation("org.jetbrains.kotlinx:kotlinx-datetime") commonMainImplementation("org.jetbrains.kotlinx:kotlinx-serialization-json") - "jsMainImplementation"("org.jetbrains.kotlin:kotlin-stdlib-js") } diff --git a/libraries/logging/src/jsMain/kotlin/com/zegreatrob/coupling/logging/InitializeLogging.kt b/libraries/logging/src/jsMain/kotlin/com/zegreatrob/coupling/logging/InitializeLogging.kt index c2cca6f3b8..e9c319c148 100644 --- a/libraries/logging/src/jsMain/kotlin/com/zegreatrob/coupling/logging/InitializeLogging.kt +++ b/libraries/logging/src/jsMain/kotlin/com/zegreatrob/coupling/logging/InitializeLogging.kt @@ -1,15 +1,15 @@ package com.zegreatrob.coupling.logging -import mu.KotlinLoggingConfiguration -import mu.KotlinLoggingLevel +import io.github.oshai.kotlinlogging.KotlinLoggingConfiguration +import io.github.oshai.kotlinlogging.Level @Suppress("unused") @JsName("initializeLogging") fun initializeLogging(developmentMode: Boolean) { KotlinLoggingConfiguration.LOG_LEVEL = if (developmentMode) { - KotlinLoggingLevel.DEBUG + Level.DEBUG } else { - KotlinLoggingLevel.INFO + Level.INFO } KotlinLoggingConfiguration.FORMATTER = JsonFormatter() diff --git a/libraries/logging/src/jsMain/kotlin/com/zegreatrob/coupling/logging/JsonFormatter.kt b/libraries/logging/src/jsMain/kotlin/com/zegreatrob/coupling/logging/JsonFormatter.kt index 14f7228965..742d8f30ca 100644 --- a/libraries/logging/src/jsMain/kotlin/com/zegreatrob/coupling/logging/JsonFormatter.kt +++ b/libraries/logging/src/jsMain/kotlin/com/zegreatrob/coupling/logging/JsonFormatter.kt @@ -1,85 +1,31 @@ package com.zegreatrob.coupling.logging +import io.github.oshai.kotlinlogging.Formatter +import io.github.oshai.kotlinlogging.Level +import io.github.oshai.kotlinlogging.Marker import kotlinx.datetime.Clock import kotlinx.serialization.json.Json -import mu.Formatter -import mu.KotlinLoggingLevel -import mu.Marker class JsonFormatter : Formatter { - override fun formatMessage(level: KotlinLoggingLevel, loggerName: String, msg: () -> Any?): Any { - val (message, properties) = extractProperties(msg) - return Json.encodeToString( - Message.serializer(), - Message( - level = level.name, - name = loggerName, - message = message, - properties = properties, - timestamp = Clock.System.now().toString(), - ), - ) - } - - override fun formatMessage( - level: KotlinLoggingLevel, - loggerName: String, - t: Throwable?, - msg: () -> Any?, - ): Any { - val (message, properties) = extractProperties(msg) - return Json.encodeToString( - Message.serializer(), - Message( - level = level.name, - name = loggerName, - message = message, - properties = properties, - timestamp = Clock.System.now().toString(), - stackTrace = t.throwableToString(), - ), - ) - } - - override fun formatMessage( - level: KotlinLoggingLevel, - loggerName: String, - marker: Marker?, - msg: () -> Any?, - ): Any { - val (message, properties) = extractProperties(msg) - return Json.encodeToString( - Message.serializer(), - Message( - level = level.name, - name = loggerName, - message = message, - properties = properties, - timestamp = Clock.System.now().toString(), - marker = marker?.getName(), - ), - ) - } - override fun formatMessage( - level: KotlinLoggingLevel, + level: Level, loggerName: String, marker: Marker?, - t: Throwable?, - msg: () -> Any?, + throwable: Throwable?, + message: () -> Any?, ): Any { - val (message, properties) = extractProperties(msg) + val (msg, properties) = extractProperties(message) return Json.encodeToString( Message.serializer(), Message( level = level.name, name = loggerName, - message = message, + message = msg, properties = properties, timestamp = Clock.System.now().toString(), marker = marker?.getName(), - stackTrace = t.throwableToString(), + stackTrace = throwable.throwableToString(), ), ) } diff --git a/libraries/repository/dynamo/build.gradle.kts b/libraries/repository/dynamo/build.gradle.kts index f3328c2bab..7c6c484953 100644 --- a/libraries/repository/dynamo/build.gradle.kts +++ b/libraries/repository/dynamo/build.gradle.kts @@ -35,7 +35,7 @@ dependencies { jsMainImplementation("org.jetbrains.kotlin:kotlin-stdlib-js") jsMainImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-core") jsMainImplementation("com.benasher44:uuid") - jsMainImplementation("io.github.microutils:kotlin-logging") + jsMainImplementation("io.github.oshai:kotlin-logging") jsMainImplementation(npmConstrained("@aws-sdk/client-dynamodb")) jsMainImplementation(npmConstrained("@aws-sdk/lib-dynamodb")) diff --git a/libraries/repository/dynamo/src/jsMain/kotlin/com/zegreatrob/coupling/repository/dynamo/DynamoDbProvider.kt b/libraries/repository/dynamo/src/jsMain/kotlin/com/zegreatrob/coupling/repository/dynamo/DynamoDbProvider.kt index 7eadd2dd65..0d463cd948 100644 --- a/libraries/repository/dynamo/src/jsMain/kotlin/com/zegreatrob/coupling/repository/dynamo/DynamoDbProvider.kt +++ b/libraries/repository/dynamo/src/jsMain/kotlin/com/zegreatrob/coupling/repository/dynamo/DynamoDbProvider.kt @@ -3,7 +3,7 @@ package com.zegreatrob.coupling.repository.dynamo import com.zegreatrob.coupling.repository.dynamo.external.DynamoDBClient import com.zegreatrob.coupling.repository.dynamo.external.awsdynamoclient.DynamoDB import com.zegreatrob.coupling.repository.dynamo.external.awslibdynamodb.DynamoDBDocumentClient -import mu.KotlinLogging +import io.github.oshai.kotlinlogging.KotlinLogging import kotlin.js.Json import kotlin.js.json diff --git a/libraries/repository/dynamo/src/jsMain/kotlin/com/zegreatrob/coupling/repository/dynamo/DynamoLoggingSyntax.kt b/libraries/repository/dynamo/src/jsMain/kotlin/com/zegreatrob/coupling/repository/dynamo/DynamoLoggingSyntax.kt index ce459450ae..fb3dea3f43 100644 --- a/libraries/repository/dynamo/src/jsMain/kotlin/com/zegreatrob/coupling/repository/dynamo/DynamoLoggingSyntax.kt +++ b/libraries/repository/dynamo/src/jsMain/kotlin/com/zegreatrob/coupling/repository/dynamo/DynamoLoggingSyntax.kt @@ -1,6 +1,6 @@ package com.zegreatrob.coupling.repository.dynamo -import mu.KotlinLogging +import io.github.oshai.kotlinlogging.KotlinLogging import kotlin.time.Duration import kotlin.time.measureTimedValue diff --git a/libraries/repository/dynamo/src/jsTest/kotlin/com/zegreatrob/coupling/repository/dynamo/Main.kt b/libraries/repository/dynamo/src/jsTest/kotlin/com/zegreatrob/coupling/repository/dynamo/Main.kt index f56f1a85f2..54320cfa4d 100644 --- a/libraries/repository/dynamo/src/jsTest/kotlin/com/zegreatrob/coupling/repository/dynamo/Main.kt +++ b/libraries/repository/dynamo/src/jsTest/kotlin/com/zegreatrob/coupling/repository/dynamo/Main.kt @@ -1,7 +1,7 @@ package com.zegreatrob.coupling.repository.dynamo import com.zegreatrob.coupling.logging.JsonFormatter -import mu.KotlinLoggingConfiguration +import io.github.oshai.kotlinlogging.KotlinLoggingConfiguration fun main() { KotlinLoggingConfiguration.FORMATTER = JsonFormatter() diff --git a/libraries/test-action/build.gradle.kts b/libraries/test-action/build.gradle.kts index 8cc1969f4a..e92a71f558 100644 --- a/libraries/test-action/build.gradle.kts +++ b/libraries/test-action/build.gradle.kts @@ -37,7 +37,7 @@ kotlin { implementation("org.junit.jupiter:junit-jupiter-engine") implementation(kotlin("reflect")) - implementation("io.github.microutils:kotlin-logging") + implementation("io.github.oshai:kotlin-logging") implementation("com.fasterxml.jackson.core:jackson-databind") } } diff --git a/libraries/test-logging/build.gradle.kts b/libraries/test-logging/build.gradle.kts index b238476434..97fb82e22d 100644 --- a/libraries/test-logging/build.gradle.kts +++ b/libraries/test-logging/build.gradle.kts @@ -13,39 +13,6 @@ kotlin { binaries.executable() } } - - sourceSets { - getByName("commonMain") { - dependencies { - - - - - - - - } - } - getByName("commonTest") { - dependencies { - implementation("org.jetbrains.kotlin:kotlin-test") - } - } - getByName("jvmMain") { - dependencies { - api("io.github.microutils:kotlin-logging") - implementation(kotlin("reflect")) - implementation("org.junit.jupiter:junit-jupiter-api") - implementation("org.junit.jupiter:junit-jupiter-engine") - implementation("org.slf4j:slf4j-simple") - } - } - getByName("jsMain") { - dependencies { - implementation("org.jetbrains.kotlin:kotlin-stdlib-js") - } - } - } } val testLoggingLib: Configuration by configurations.creating {} @@ -61,9 +28,15 @@ dependencies { commonMainApi("com.zegreatrob.testmints:standard") commonMainApi("com.zegreatrob.testmints:report") commonMainImplementation("org.jetbrains.kotlinx:kotlinx-datetime") - commonMainImplementation("org.jetbrains.kotlin:kotlin-stdlib-common") - commonMainImplementation("io.github.microutils:kotlin-logging") commonMainImplementation("org.jetbrains.kotlin:kotlin-test") + + commonTestImplementation("org.jetbrains.kotlin:kotlin-test") + + "jvmMainApi"("io.github.oshai:kotlin-logging") + "jvmMainImplementation"(kotlin("reflect")) + "jvmMainImplementation"("org.junit.jupiter:junit-jupiter-api") + "jvmMainImplementation"("org.junit.jupiter:junit-jupiter-engine") + "jvmMainImplementation"("org.slf4j:slf4j-simple") } artifacts { diff --git a/libraries/test-logging/src/commonMain/kotlin/com/zegreatrob/coupling/testlogging/JsonLoggingTestMintsReporter.kt b/libraries/test-logging/src/commonMain/kotlin/com/zegreatrob/coupling/testlogging/JsonLoggingTestMintsReporter.kt index 962be2c15b..b00e2cdabb 100644 --- a/libraries/test-logging/src/commonMain/kotlin/com/zegreatrob/coupling/testlogging/JsonLoggingTestMintsReporter.kt +++ b/libraries/test-logging/src/commonMain/kotlin/com/zegreatrob/coupling/testlogging/JsonLoggingTestMintsReporter.kt @@ -2,7 +2,7 @@ package com.zegreatrob.coupling.testlogging import com.zegreatrob.testmints.report.MintReporter import com.zegreatrob.testmints.report.MintReporterConfig -import mu.KotlinLogging +import io.github.oshai.kotlinlogging.KotlinLogging class JsonLoggingTestMintsReporter private constructor() : MintReporter { diff --git a/libraries/test-logging/src/jsMain/kotlin/com/zegreatrob/coupling/testlogging/JasmineJsonLoggingReporter.kt b/libraries/test-logging/src/jsMain/kotlin/com/zegreatrob/coupling/testlogging/JasmineJsonLoggingReporter.kt index 0ae22d95d8..5f04573478 100644 --- a/libraries/test-logging/src/jsMain/kotlin/com/zegreatrob/coupling/testlogging/JasmineJsonLoggingReporter.kt +++ b/libraries/test-logging/src/jsMain/kotlin/com/zegreatrob/coupling/testlogging/JasmineJsonLoggingReporter.kt @@ -1,9 +1,9 @@ package com.zegreatrob.coupling.testlogging import com.zegreatrob.coupling.logging.initializeLogging +import io.github.oshai.kotlinlogging.KotlinLogging import kotlinx.datetime.Clock import kotlinx.datetime.Instant -import mu.KotlinLogging @Suppress("unused") @JsName("JasmineJsonLoggingReporter") diff --git a/scripts/export/build.gradle.kts b/scripts/export/build.gradle.kts index a20bd2eed0..c819f77f91 100644 --- a/scripts/export/build.gradle.kts +++ b/scripts/export/build.gradle.kts @@ -27,7 +27,7 @@ kotlin { api(kotlin("stdlib")) api(kotlin("stdlib-common")) api("com.benasher44:uuid") - api("io.github.microutils:kotlin-logging") + api("io.github.oshai:kotlin-logging") api("org.jetbrains.kotlinx:kotlinx-serialization-json") } } diff --git a/scripts/export/src/jsMain/kotlin/com/zegreatrob/coupling/export/Main.kt b/scripts/export/src/jsMain/kotlin/com/zegreatrob/coupling/export/Main.kt index 493a248365..8d4a13f353 100644 --- a/scripts/export/src/jsMain/kotlin/com/zegreatrob/coupling/export/Main.kt +++ b/scripts/export/src/jsMain/kotlin/com/zegreatrob/coupling/export/Main.kt @@ -1,13 +1,13 @@ package com.zegreatrob.coupling.export import com.zegreatrob.coupling.model.user.User -import mu.KotlinLoggingConfiguration -import mu.KotlinLoggingLevel +import io.github.oshai.kotlinlogging.KotlinLoggingConfiguration +import io.github.oshai.kotlinlogging.Level val user = User("EXPORT_USER", "robert.f.murdock@gmail.com", emptySet()) fun main() { - KotlinLoggingConfiguration.LOG_LEVEL = KotlinLoggingLevel.WARN + KotlinLoggingConfiguration.LOG_LEVEL = Level.WARN exportWithDynamo() // exportWithMongo() } diff --git a/scripts/import/build.gradle.kts b/scripts/import/build.gradle.kts index 9ca10d1330..89aabeb113 100644 --- a/scripts/import/build.gradle.kts +++ b/scripts/import/build.gradle.kts @@ -22,7 +22,7 @@ kotlin { api(kotlin("stdlib")) api(kotlin("stdlib-common")) api("com.benasher44:uuid") - api("io.github.microutils:kotlin-logging") + api("io.github.oshai:kotlin-logging") api("org.jetbrains.kotlinx:kotlinx-serialization-json") } } diff --git a/scripts/import/src/jsMain/kotlin/com/zegreatrob/coupling/import/Main.kt b/scripts/import/src/jsMain/kotlin/com/zegreatrob/coupling/import/Main.kt index 9ac1c5ab39..0e17b8c651 100644 --- a/scripts/import/src/jsMain/kotlin/com/zegreatrob/coupling/import/Main.kt +++ b/scripts/import/src/jsMain/kotlin/com/zegreatrob/coupling/import/Main.kt @@ -21,14 +21,14 @@ import com.zegreatrob.coupling.repository.dynamo.DynamoPartyRepository import com.zegreatrob.coupling.repository.dynamo.DynamoPinRepository import com.zegreatrob.coupling.repository.dynamo.DynamoPlayerRepository import com.zegreatrob.coupling.repository.dynamo.DynamoUserRepository +import io.github.oshai.kotlinlogging.KotlinLogging +import io.github.oshai.kotlinlogging.KotlinLoggingConfiguration +import io.github.oshai.kotlinlogging.Level import kotlinx.coroutines.CompletableDeferred import kotlinx.coroutines.MainScope import kotlinx.coroutines.launch import kotlinx.datetime.Clock import kotlinx.serialization.json.decodeFromDynamic -import mu.KotlinLogging -import mu.KotlinLoggingConfiguration -import mu.KotlinLoggingLevel import kotlin.js.Json val user = User("IMPORT_USER", "robert.f.murdock@gmail.com", emptySet()) @@ -36,7 +36,7 @@ val user = User("IMPORT_USER", "robert.f.murdock@gmail.com", emptySet()) private val logger = KotlinLogging.logger("import") fun main() { - KotlinLoggingConfiguration.LOG_LEVEL = KotlinLoggingLevel.WARN + KotlinLoggingConfiguration.LOG_LEVEL = Level.WARN MainScope().launch { val catalog = DynamoRepositoryCatalog(user.email, Clock.System) diff --git a/sdk/build.gradle.kts b/sdk/build.gradle.kts index fb7e5de813..07ef689231 100644 --- a/sdk/build.gradle.kts +++ b/sdk/build.gradle.kts @@ -45,7 +45,7 @@ dependencies { "commonTestImplementation"("com.zegreatrob.testmints:async") "commonTestImplementation"("com.zegreatrob.testmints:minassert") "commonTestImplementation"("com.zegreatrob.testmints:standard") - "commonTestImplementation"("io.github.microutils:kotlin-logging") + "commonTestImplementation"("io.github.oshai:kotlin-logging") "commonTestImplementation"("org.jetbrains.kotlin:kotlin-test") "jsMainImplementation"("org.jetbrains.kotlin-wrappers:kotlin-extensions") diff --git a/sdk/src/commonTest/kotlin/com/zegreatrob/coupling/sdk/AuthorizedSdk.kt b/sdk/src/commonTest/kotlin/com/zegreatrob/coupling/sdk/AuthorizedSdk.kt index 1e3b4ec343..36c9f839c5 100644 --- a/sdk/src/commonTest/kotlin/com/zegreatrob/coupling/sdk/AuthorizedSdk.kt +++ b/sdk/src/commonTest/kotlin/com/zegreatrob/coupling/sdk/AuthorizedSdk.kt @@ -7,6 +7,7 @@ import com.zegreatrob.coupling.action.party.DeletePartyCommand import com.zegreatrob.coupling.action.party.fire import com.zegreatrob.coupling.sdk.gql.graphQuery import com.zegreatrob.testmints.action.ActionCannon +import io.github.oshai.kotlinlogging.KotlinLogging import io.ktor.client.HttpClient import io.ktor.client.call.body import io.ktor.client.plugins.contentnegotiation.ContentNegotiation @@ -25,7 +26,6 @@ import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.async import kotlinx.serialization.json.JsonObject import kotlinx.serialization.json.jsonPrimitive -import mu.KotlinLogging const val primaryAuthorizedUsername = "couplingtestuser@gmail.com" val primaryTestPassword = getEnv("COUPLING_PRIMARY_TEST_PASSWORD") ?: "" diff --git a/sdk/src/jsTest/kotlin/com/zegreatrob/coupling/sdk/SetupFormatter.kt b/sdk/src/jsTest/kotlin/com/zegreatrob/coupling/sdk/SetupFormatter.kt index f6274314a9..11fcd8c556 100644 --- a/sdk/src/jsTest/kotlin/com/zegreatrob/coupling/sdk/SetupFormatter.kt +++ b/sdk/src/jsTest/kotlin/com/zegreatrob/coupling/sdk/SetupFormatter.kt @@ -2,7 +2,7 @@ package com.zegreatrob.coupling.sdk import com.zegreatrob.coupling.logging.JsonFormatter import com.zegreatrob.coupling.sdk.js.Process -import mu.KotlinLoggingConfiguration +import io.github.oshai.kotlinlogging.KotlinLoggingConfiguration actual fun getEnv(name: String): String? = Process.getEnv(name) diff --git a/server/action/build.gradle.kts b/server/action/build.gradle.kts index f86355c152..379b458713 100644 --- a/server/action/build.gradle.kts +++ b/server/action/build.gradle.kts @@ -22,7 +22,7 @@ dependencies { commonMainApi("com.zegreatrob.testmints:action") commonMainApi("com.zegreatrob.testmints:action-async") commonMainImplementation("com.benasher44:uuid") - commonMainImplementation("io.github.microutils:kotlin-logging") + commonMainImplementation("io.github.oshai:kotlin-logging") commonMainImplementation("org.jetbrains.kotlin:kotlin-stdlib-js") commonMainImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-core") diff --git a/server/build.gradle.kts b/server/build.gradle.kts index 319ab7901b..28aed883f9 100644 --- a/server/build.gradle.kts +++ b/server/build.gradle.kts @@ -36,7 +36,7 @@ dependencies { jsMainImplementation(project(":libraries:repository:memory")) jsMainImplementation("com.benasher44:uuid") jsMainImplementation("com.zegreatrob.jsmints:minjson") - jsMainImplementation("io.github.microutils:kotlin-logging") + jsMainImplementation("io.github.oshai:kotlin-logging") jsMainImplementation("io.ktor:ktor-client-logging") jsMainImplementation("org.jetbrains.kotlin-wrappers:kotlin-node") jsMainImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-core") diff --git a/server/src/jsMain/kotlin/com/zegreatrob/coupling/server/StartupLogger.kt b/server/src/jsMain/kotlin/com/zegreatrob/coupling/server/StartupLogger.kt index 2eda9329a5..c2a6471273 100644 --- a/server/src/jsMain/kotlin/com/zegreatrob/coupling/server/StartupLogger.kt +++ b/server/src/jsMain/kotlin/com/zegreatrob/coupling/server/StartupLogger.kt @@ -1,6 +1,6 @@ package com.zegreatrob.coupling.server -import mu.KotlinLogging +import io.github.oshai.kotlinlogging.KotlinLogging private val logger by lazy { KotlinLogging.logger("StartupLogger") } diff --git a/server/src/jsMain/kotlin/com/zegreatrob/coupling/server/express/middleware/RequestLogger.kt b/server/src/jsMain/kotlin/com/zegreatrob/coupling/server/express/middleware/RequestLogger.kt index fa0e9cece0..3bd8a69cfc 100644 --- a/server/src/jsMain/kotlin/com/zegreatrob/coupling/server/express/middleware/RequestLogger.kt +++ b/server/src/jsMain/kotlin/com/zegreatrob/coupling/server/express/middleware/RequestLogger.kt @@ -2,9 +2,9 @@ package com.zegreatrob.coupling.server.express.middleware import com.zegreatrob.coupling.server.external.express.Request import com.zegreatrob.coupling.server.external.express.Response +import io.github.oshai.kotlinlogging.KotlinLogging import kotlinx.coroutines.CompletableDeferred import kotlinx.coroutines.launch -import mu.KotlinLogging import kotlin.time.measureTime private val logger by lazy { KotlinLogging.logger("RequestLogger") }