Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,33 @@ To get a logger, one can use the following:
1. Make a logging class implement `WithLogging` interface.
2. Get a logger from `LoggingFactory`.

The interface provides a default property `logger` that returns a logger
### Logging via `WithLogging` interface

The interface provides the property `logger` that returns a logger
for the implementing class or object:

```kotlin
class Example : WithLogging {
fun doSomething() {
logger.atWarning() // Call to the default property of `WithLogging`.
logger.atWarning()
.log { "..." }
}
}
```

The `WithLogging` interface also provides shortcut properties for each logging level
that provide the most compact way to invoke the logging API:

```kotlin
class Example : WithLogging {
fun doSomething() {
atWarning.log { "..." }
}
}
```

### Obtaining a logger via `LoggingFactory`

`LoggingFactory` has two methods that return a logger for the enclosing class
and for the given `KClass`:

Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ val protobufPluginVersion = "0.9.6"
* @see <a href="https://github.com/Kotlin/dokka/releases">
* Dokka Releases</a>
*/
val dokkaVersion = "2.1.0"
val dokkaVersion = "2.2.0"

/**
* The version of Detekt Gradle Plugin.
Expand Down
3 changes: 2 additions & 1 deletion buildSrc/src/main/kotlin/io/spine/dependency/build/Dokka.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

package io.spine.dependency.build

import io.spine.dependency.build.Dokka.GradlePlugin.id
import io.spine.dependency.local.Spine

// https://github.com/Kotlin/dokka
Expand All @@ -37,7 +38,7 @@ object Dokka {
* When changing the version, also change the version used in the
* `buildSrc/build.gradle.kts`.
*/
const val version = "2.1.0"
const val version = "2.2.0"
Comment thread
alexander-yevsyukov marked this conversation as resolved.

object GradlePlugin {
const val id = "org.jetbrains.dokka"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
* disclaimer.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package io.spine.dependency.lib

/**
* Annotations library from JetBrains.
*
* https://github.com/JetBrains/java-annotations
*/
object JetBrainsAnnotations {
/**
* The version of the library transitively used.
*/
const val version = "23.0.0"
const val groupId = "org.jetbrains"
const val artifactId = "annotations"
const val lib = "$groupId:$artifactId:$version"
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ object Compiler : Dependency() {
* The version of the Compiler dependencies.
*/
override val version: String
private const val fallbackVersion = "2.0.0-SNAPSHOT.042"
private const val fallbackVersion = "2.0.0-SNAPSHOT.043"

/**
* The distinct version of the Compiler used by other build tools.
Expand All @@ -81,7 +81,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.042"
private const val fallbackDfVersion = "2.0.0-SNAPSHOT.043"

/**
* The artifact for the Compiler Gradle plugin.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ package io.spine.dependency.local
*/
@Suppress("ConstPropertyName", "unused")
object Logging {
const val version = "2.0.0-SNAPSHOT.411"
const val version = "2.0.0-SNAPSHOT.414"
const val group = Spine.group

const val loggingArtifact = "spine-logging"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ package io.spine.dependency.local
@Suppress("ConstPropertyName", "unused")
object ToolBase {
const val group = Spine.toolsGroup
const val version = "2.0.0-SNAPSHOT.376"
const val dogfoodingVersion = "2.0.0-SNAPSHOT.376"
const val version = "2.0.0-SNAPSHOT.378"
const val dogfoodingVersion = "2.0.0-SNAPSHOT.378"

const val lib = "$group:tool-base:$version"
const val classicCodegen = "$group:classic-codegen:$version"
Expand Down
Loading
Loading