diff --git a/.github/workflows/build-on-ubuntu.yml b/.github/workflows/build-on-ubuntu.yml
index 01f6fd71a..b07bf0fb0 100644
--- a/.github/workflows/build-on-ubuntu.yml
+++ b/.github/workflows/build-on-ubuntu.yml
@@ -87,7 +87,7 @@ jobs:
# there anyway).
- name: Upload code coverage report
if: steps.codecov.outputs.available == 'true' || github.event_name == 'push'
- uses: codecov/codecov-action@v4
+ uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
index 85d8f5503..5c4b3ef9d 100644
--- a/.idea/kotlinc.xml
+++ b/.idea/kotlinc.xml
@@ -7,4 +7,4 @@
-
+
\ No newline at end of file
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt
index ff79b3c69..e3b4d0aa4 100644
--- a/buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt
@@ -27,6 +27,8 @@
package io.spine.dependency.local
import io.spine.dependency.Dependency
+import io.spine.dependency.local.Compiler.DF_VERSION_ENV
+import io.spine.dependency.local.Compiler.VERSION_ENV
/**
* Dependencies on the Spine Compiler modules.
@@ -72,7 +74,7 @@ object Compiler : Dependency() {
* The version of the Compiler dependencies.
*/
override val version: String
- private const val fallbackVersion = "2.0.0-SNAPSHOT.056"
+ private const val fallbackVersion = "2.0.0-SNAPSHOT.057"
/**
* The distinct version of the Compiler used by other build tools.
@@ -81,7 +83,7 @@ object Compiler : Dependency() {
* transitive dependencies, this is the version used to build the project itself.
*/
val dogfoodingVersion: String
- private const val fallbackDfVersion = "2.0.0-SNAPSHOT.056"
+ private const val fallbackDfVersion = "2.0.0-SNAPSHOT.057"
/**
* The artifact for the Compiler Gradle plugin.
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/Logging.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/Logging.kt
index 04d19ea52..e9f477ac3 100644
--- a/buildSrc/src/main/kotlin/io/spine/dependency/local/Logging.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Logging.kt
@@ -33,7 +33,7 @@ package io.spine.dependency.local
*/
@Suppress("ConstPropertyName", "unused")
object Logging {
- const val version = "2.0.0-SNAPSHOT.417"
+ const val version = "2.0.0-SNAPSHOT.419"
const val group = Spine.group
const val loggingArtifact = "spine-logging"
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/kotlin/KotlinConfig.kt b/buildSrc/src/main/kotlin/io/spine/gradle/kotlin/KotlinConfig.kt
index 92b7a3874..0e5099a77 100644
--- a/buildSrc/src/main/kotlin/io/spine/gradle/kotlin/KotlinConfig.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/kotlin/KotlinConfig.kt
@@ -1,5 +1,5 @@
/*
- * Copyright 2025, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -55,20 +55,26 @@ fun KotlinJvmProjectExtension.applyJvmToolchain(version: String) =
*/
@Suppress("unused")
fun KotlinCommonCompilerOptions.setFreeCompilerArgs() {
+ val optIns = mutableListOf(
+ "kotlin.contracts.ExperimentalContracts",
+ "kotlin.ExperimentalUnsignedTypes",
+ "kotlin.ExperimentalStdlibApi",
+ "kotlin.experimental.ExperimentalTypeInference",
+ )
if (this is KotlinJvmCompilerOptions) {
jvmDefault.set(JvmDefaultMode.NO_COMPATIBILITY)
+ // `kotlin.io.path` ships only in the JVM standard library, so for common
+ // and Native compilations this opt-in marker is unresolved and the compiler
+ // warns about it. Scope it to JVM compilations; multiplatform common and
+ // Native code cannot use the API anyway.
+ optIns.add("kotlin.io.path.ExperimentalPathApi")
}
freeCompilerArgs.addAll(
listOf(
"-Xskip-prerelease-check",
"-Xexpect-actual-classes",
"-Xcontext-parameters",
- "-opt-in=" +
- "kotlin.contracts.ExperimentalContracts," +
- "kotlin.io.path.ExperimentalPathApi," +
- "kotlin.ExperimentalUnsignedTypes," +
- "kotlin.ExperimentalStdlibApi," +
- "kotlin.experimental.ExperimentalTypeInference",
+ "-opt-in=" + optIns.joinToString(separator = ","),
)
)
}
diff --git a/config b/config
index 03e67ea0e..3f13608b3 160000
--- a/config
+++ b/config
@@ -1 +1 @@
-Subproject commit 03e67ea0e2652a73d6f24fe22caad8a0bf130cc1
+Subproject commit 3f13608b3bb1a8bc736fbb748b95ec3dc11843a2
diff --git a/contexts/context-tests/src/testFixtures/kotlin/io/spine/logging/context/AbstractContextDataProviderSpec.kt b/contexts/context-tests/src/testFixtures/kotlin/io/spine/logging/context/AbstractContextDataProviderSpec.kt
index ab96ad2c0..a36b8493d 100644
--- a/contexts/context-tests/src/testFixtures/kotlin/io/spine/logging/context/AbstractContextDataProviderSpec.kt
+++ b/contexts/context-tests/src/testFixtures/kotlin/io/spine/logging/context/AbstractContextDataProviderSpec.kt
@@ -1,5 +1,5 @@
/*
- * Copyright 2025, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -87,6 +87,15 @@ abstract class AbstractContextDataProviderSpec {
private companion object {
private val FOO = MetadataKey.single("foo")
private val BAR = MetadataKey.repeated("bar")
+
+ /**
+ * A custom [MetadataKey] created by subclassing rather than via the factory
+ * functions, reproducing the scenario from
+ * [issue #70](https://github.com/SpineEventEngine/logging/issues/70).
+ */
+ private val CUSTOM =
+ object : MetadataKey("custom", String::class, canRepeat = false) {}
+
private val SUB_TASK = ScopeType.create("sub task")
private val BATCH_JOB = ScopeType.create("batch job")
}
@@ -157,6 +166,30 @@ abstract class AbstractContextDataProviderSpec {
checkCallbackWasExecuted()
}
+ /**
+ * Verifies that a custom [MetadataKey] — created by subclassing rather than via
+ * the factory functions — can be attached to a context and is delivered to the
+ * context metadata.
+ *
+ * This is a regression test for
+ * [issue #70](https://github.com/SpineEventEngine/logging/issues/70), where
+ * passing a custom key to `withMetadata` used to throw a `ClassCastException`
+ * on the JVM.
+ */
+ @Test
+ fun `with a custom metadata key`() {
+ val value = "custom-value"
+ contextMetadata.shouldBeEmpty()
+ context.newContext()
+ .withMetadata(CUSTOM, value)
+ .call {
+ contextMetadata.shouldUniquelyContain(CUSTOM, value)
+ markCallbackExecuted()
+ }
+ contextMetadata.shouldBeEmpty()
+ checkCallbackWasExecuted()
+ }
+
@Test
fun `with a log level map`() {
val defaultLevel = TLevel.FINE
diff --git a/docs/dependencies/dependencies.md b/docs/dependencies/dependencies.md
index 756a07893..10a70642b 100644
--- a/docs/dependencies/dependencies.md
+++ b/docs/dependencies/dependencies.md
@@ -1,6 +1,6 @@
-# Dependencies of `io.spine:spine-logging-context-tests:2.0.0-SNAPSHOT.419`
+# Dependencies of `io.spine:spine-logging-context-tests:2.0.0-SNAPSHOT.420`
## Runtime
1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 26.1.0.
@@ -441,14 +441,14 @@
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.
-This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
+This report was generated on **Tue Jun 30 00:13:43 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
-# Dependencies of `io.spine:spine-logging-fixtures:2.0.0-SNAPSHOT.419`
+# Dependencies of `io.spine:spine-logging-fixtures:2.0.0-SNAPSHOT.420`
## Runtime
## Compile, tests, and tooling
@@ -1240,14 +1240,14 @@ This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.
-This report was generated on **Sun Jun 28 21:04:42 WEST 2026** using
+This report was generated on **Tue Jun 30 00:13:45 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
-# Dependencies of `io.spine:spine-logging-grpc-context:2.0.0-SNAPSHOT.419`
+# Dependencies of `io.spine:spine-logging-grpc-context:2.0.0-SNAPSHOT.420`
## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
@@ -2094,14 +2094,14 @@ This report was generated on **Sun Jun 28 21:04:42 WEST 2026** using
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.
-This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
+This report was generated on **Tue Jun 30 00:13:43 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
-# Dependencies of `io.spine:spine-logging-jul-backend:2.0.0-SNAPSHOT.419`
+# Dependencies of `io.spine:spine-logging-jul-backend:2.0.0-SNAPSHOT.420`
## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
@@ -2932,14 +2932,14 @@ This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.
-This report was generated on **Sun Jun 28 21:04:42 WEST 2026** using
+This report was generated on **Tue Jun 30 00:13:46 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
-# Dependencies of `io.spine:spine-logging-jvm-default-platform:2.0.0-SNAPSHOT.419`
+# Dependencies of `io.spine:spine-logging-jvm-default-platform:2.0.0-SNAPSHOT.420`
## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
@@ -3786,14 +3786,14 @@ This report was generated on **Sun Jun 28 21:04:42 WEST 2026** using
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.
-This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
+This report was generated on **Tue Jun 30 00:13:46 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
-# Dependencies of `io.spine:spine-logging-jvm-jul-backend-grpc-context:2.0.0-SNAPSHOT.419`
+# Dependencies of `io.spine:spine-logging-jvm-jul-backend-grpc-context:2.0.0-SNAPSHOT.420`
## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
@@ -4692,14 +4692,14 @@ This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.
-This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
+This report was generated on **Tue Jun 30 00:13:43 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
-# Dependencies of `io.spine:spine-logging-jvm-jul-backend-std-context:2.0.0-SNAPSHOT.419`
+# Dependencies of `io.spine:spine-logging-jvm-jul-backend-std-context:2.0.0-SNAPSHOT.420`
## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
@@ -5590,14 +5590,14 @@ This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.
-This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
+This report was generated on **Tue Jun 30 00:13:43 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
-# Dependencies of `io.spine:spine-logging-jvm-log4j2-backend-std-context:2.0.0-SNAPSHOT.419`
+# Dependencies of `io.spine:spine-logging-jvm-log4j2-backend-std-context:2.0.0-SNAPSHOT.420`
## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
@@ -6508,14 +6508,14 @@ This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.
-This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
+This report was generated on **Tue Jun 30 00:13:43 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
-# Dependencies of `io.spine:spine-logging-jvm-slf4j-jdk14-backend-std-context:2.0.0-SNAPSHOT.419`
+# Dependencies of `io.spine:spine-logging-jvm-slf4j-jdk14-backend-std-context:2.0.0-SNAPSHOT.420`
## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
@@ -7414,14 +7414,14 @@ This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.
-This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
+This report was generated on **Tue Jun 30 00:13:43 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
-# Dependencies of `io.spine:spine-logging-jvm-slf4j-reload4j-backend-std-context:2.0.0-SNAPSHOT.419`
+# Dependencies of `io.spine:spine-logging-jvm-slf4j-reload4j-backend-std-context:2.0.0-SNAPSHOT.420`
## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
@@ -8324,14 +8324,14 @@ This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.
-This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
+This report was generated on **Tue Jun 30 00:13:43 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
-# Dependencies of `io.spine:spine-logging-log4j2-backend:2.0.0-SNAPSHOT.419`
+# Dependencies of `io.spine:spine-logging-log4j2-backend:2.0.0-SNAPSHOT.420`
## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
@@ -9206,14 +9206,14 @@ This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.
-This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
+This report was generated on **Tue Jun 30 00:13:43 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
-# Dependencies of `io.spine:spine-logging:2.0.0-SNAPSHOT.419`
+# Dependencies of `io.spine:spine-logging:2.0.0-SNAPSHOT.420`
## Runtime
## Compile, tests, and tooling
@@ -10013,14 +10013,14 @@ This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.
-This report was generated on **Sun Jun 28 21:04:42 WEST 2026** using
+This report was generated on **Tue Jun 30 00:13:45 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
-# Dependencies of `io.spine.tools:logging-testlib:2.0.0-SNAPSHOT.419`
+# Dependencies of `io.spine.tools:logging-testlib:2.0.0-SNAPSHOT.420`
## Runtime
## Compile, tests, and tooling
@@ -10832,14 +10832,14 @@ This report was generated on **Sun Jun 28 21:04:42 WEST 2026** using
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.
-This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
+This report was generated on **Tue Jun 30 00:13:44 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
-# Dependencies of `io.spine:spine-logging-otel-backend:2.0.0-SNAPSHOT.419`
+# Dependencies of `io.spine:spine-logging-otel-backend:2.0.0-SNAPSHOT.420`
## Runtime
## Compile, tests, and tooling
@@ -11739,14 +11739,14 @@ This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.
-This report was generated on **Sun Jun 28 21:04:42 WEST 2026** using
+This report was generated on **Tue Jun 30 00:13:45 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
-# Dependencies of `io.spine:spine-logging-otel-backend-bootstrap:2.0.0-SNAPSHOT.419`
+# Dependencies of `io.spine:spine-logging-otel-backend-bootstrap:2.0.0-SNAPSHOT.420`
## Runtime
1. **Group** : com.google.auto.service. **Name** : auto-service-annotations. **Version** : 1.1.1.
@@ -13157,14 +13157,14 @@ This report was generated on **Sun Jun 28 21:04:42 WEST 2026** using
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.
-This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
+This report was generated on **Tue Jun 30 00:13:43 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
-# Dependencies of `io.spine:spine-logging-probe-backend:2.0.0-SNAPSHOT.419`
+# Dependencies of `io.spine:spine-logging-probe-backend:2.0.0-SNAPSHOT.420`
## Runtime
1. **Group** : com.google.auto.service. **Name** : auto-service-annotations. **Version** : 1.1.1.
@@ -14015,14 +14015,14 @@ This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.
-This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
+This report was generated on **Tue Jun 30 00:13:43 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
-# Dependencies of `io.spine:spine-logging-smoke-test:2.0.0-SNAPSHOT.419`
+# Dependencies of `io.spine:spine-logging-smoke-test:2.0.0-SNAPSHOT.420`
## Runtime
1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.22.0.
@@ -14921,14 +14921,14 @@ This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.
-This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
+This report was generated on **Tue Jun 30 00:13:44 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
-# Dependencies of `io.spine:spine-logging-std-context:2.0.0-SNAPSHOT.419`
+# Dependencies of `io.spine:spine-logging-std-context:2.0.0-SNAPSHOT.420`
## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
@@ -15759,6 +15759,6 @@ This report was generated on **Sun Jun 28 21:04:41 WEST 2026** using
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.
-This report was generated on **Sun Jun 28 21:04:42 WEST 2026** using
+This report was generated on **Tue Jun 30 00:13:44 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
\ No newline at end of file
diff --git a/docs/dependencies/pom.xml b/docs/dependencies/pom.xml
index cc46af21e..963ad82a1 100644
--- a/docs/dependencies/pom.xml
+++ b/docs/dependencies/pom.xml
@@ -10,7 +10,7 @@ all modules and does not describe the project structure per-subproject.
-->
io.spinelogging
-2.0.0-SNAPSHOT.419
+2.0.0-SNAPSHOT.4202015
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index df6a6ad76..a9db11550 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
diff --git a/gradlew b/gradlew
index b9bb139f7..249efbb03 100755
--- a/gradlew
+++ b/gradlew
@@ -20,7 +20,7 @@
##############################################################################
#
-# Gradle start up script for POSIX generated by Gradle.
+# gradlew start up script for POSIX generated by Gradle.
#
# Important for running:
#
@@ -29,7 +29,7 @@
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
-# ksh Gradle
+# ksh gradlew
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
diff --git a/gradlew.bat b/gradlew.bat
index 24c62d56f..a51ec4f58 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -19,7 +19,7 @@
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
-@rem Gradle startup script for Windows
+@rem gradlew startup script for Windows
@rem
@rem ##########################################################################
@@ -72,7 +72,7 @@ echo location of your Java installation. 1>&2
-@rem Execute Gradle
+@rem Execute gradlew
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
@rem which allows us to clear the local environment before executing the java command
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
diff --git a/logging/src/commonMain/kotlin/io/spine/logging/MetadataKey.kt b/logging/src/commonMain/kotlin/io/spine/logging/MetadataKey.kt
index 51c898e6c..5c6347fe8 100644
--- a/logging/src/commonMain/kotlin/io/spine/logging/MetadataKey.kt
+++ b/logging/src/commonMain/kotlin/io/spine/logging/MetadataKey.kt
@@ -1,5 +1,5 @@
/*
- * Copyright 2025, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -64,6 +64,14 @@ import kotlin.reflect.KClass
* to be loaded very early in the logging platform lifecycle without risking any static
* initialization issues.
*
+ * A key can be created either through a factory function — [single] or [repeated] on this
+ * class, or `singleMetadataKey` / `repeatedMetadataKey` on
+ * [LoggingFactory] — or by subclassing this class to
+ * customize value formatting (see the protected constructor and the [emit] methods below).
+ * Both kinds of keys are accepted wherever a `MetadataKey` is expected, including the
+ * `withMetadata` method of the
+ * [ScopedLoggingContext.Builder][io.spine.logging.context.ScopedLoggingContext.Builder].
+ *
* Custom subclasses of `MetadataKey` which override either of the protected [.emit] methods
* should take care to avoid calling any code, which might trigger logging since this could lead
* to unexpected recursion, especially if the key is being logged as part of a
diff --git a/logging/src/jvmMain/kotlin/io/spine/logging/LoggingFactory.kt b/logging/src/jvmMain/kotlin/io/spine/logging/LoggingFactory.kt
index 9ee77f2fa..1b701d8ce 100644
--- a/logging/src/jvmMain/kotlin/io/spine/logging/LoggingFactory.kt
+++ b/logging/src/jvmMain/kotlin/io/spine/logging/LoggingFactory.kt
@@ -1,5 +1,5 @@
/*
- * Copyright 2025, TeamDev. All rights reserved.
+ * Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -61,8 +61,8 @@ public actual object LoggingFactory {
): MetadataKey = MetadataKey.single(label, valueClass)
@JvmStatic
- public fun singleMetadataKey(label: String, type: Class): MetadataKey =
- singleMetadataKey(label, type.kotlin)
+ public fun singleMetadataKey(label: String, valueClass: Class): MetadataKey =
+ singleMetadataKey(label, valueClass.kotlin)
@JvmStatic
public actual fun repeatedMetadataKey(
@@ -71,8 +71,8 @@ public actual object LoggingFactory {
): MetadataKey = MetadataKey.repeated(label, valueClass)
@JvmStatic
- public fun repeatedMetadataKey(label: String, type: Class): MetadataKey =
- repeatedMetadataKey(label, type.kotlin)
+ public fun repeatedMetadataKey(label: String, valueClass: Class): MetadataKey =
+ repeatedMetadataKey(label, valueClass.kotlin)
private fun createForClass(cls: Class<*>): Logger {
val loggerBackend = Platform.getBackend(cls.name)
diff --git a/version.gradle.kts b/version.gradle.kts
index d3b1ef081..6e7a6c334 100644
--- a/version.gradle.kts
+++ b/version.gradle.kts
@@ -24,4 +24,4 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-val versionToPublish: String by extra("2.0.0-SNAPSHOT.419")
+val versionToPublish: String by extra("2.0.0-SNAPSHOT.420")