aboutsummaryrefslogtreecommitdiff
path: root/runners/maven-plugin/src/main/kotlin/MavenDokkaLogger.kt
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2023-08-31 20:16:01 +0200
committerGitHub <noreply@github.com>2023-08-31 20:16:01 +0200
commit02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33 (patch)
tree66f6d6f089a93b863bf1144666491eca6729ad05 /runners/maven-plugin/src/main/kotlin/MavenDokkaLogger.kt
parent6a181a7a2b03ec263788d137610e86937a57d434 (diff)
downloaddokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.tar.gz
dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.tar.bz2
dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.zip
Enable explicit API mode (#3139)
Diffstat (limited to 'runners/maven-plugin/src/main/kotlin/MavenDokkaLogger.kt')
-rw-r--r--runners/maven-plugin/src/main/kotlin/MavenDokkaLogger.kt28
1 files changed, 22 insertions, 6 deletions
diff --git a/runners/maven-plugin/src/main/kotlin/MavenDokkaLogger.kt b/runners/maven-plugin/src/main/kotlin/MavenDokkaLogger.kt
index bf7997d3..1bc39d10 100644
--- a/runners/maven-plugin/src/main/kotlin/MavenDokkaLogger.kt
+++ b/runners/maven-plugin/src/main/kotlin/MavenDokkaLogger.kt
@@ -8,7 +8,9 @@ import org.apache.maven.plugin.logging.Log
import org.jetbrains.dokka.utilities.DokkaLogger
import java.util.concurrent.atomic.AtomicInteger
-class MavenDokkaLogger(val log: Log) : DokkaLogger {
+public class MavenDokkaLogger(
+ public val log: Log
+) : DokkaLogger {
private val warningsCounter = AtomicInteger()
private val errorsCounter = AtomicInteger()
@@ -20,9 +22,23 @@ class MavenDokkaLogger(val log: Log) : DokkaLogger {
get() = errorsCounter.get()
set(value) = errorsCounter.set(value)
- override fun debug(message: String) = log.debug(message)
- override fun info(message: String) = log.info(message)
- override fun progress(message: String) = log.info(message)
- override fun warn(message: String) = log.warn(message).also { warningsCounter.incrementAndGet() }
- override fun error(message: String) = log.error(message).also { errorsCounter.incrementAndGet() }
+ override fun debug(message: String) {
+ log.debug(message)
+ }
+
+ override fun info(message: String) {
+ log.info(message)
+ }
+
+ override fun progress(message: String) {
+ log.info(message)
+ }
+
+ override fun warn(message: String) {
+ this.log.warn(message).also { warningsCounter.incrementAndGet() }
+ }
+
+ override fun error(message: String) {
+ log.error(message).also { errorsCounter.incrementAndGet() }
+ }
}