diff options
Diffstat (limited to 'core/test-api/src/main')
-rw-r--r-- | core/test-api/src/main/kotlin/testApi/context/MockContext.kt | 3 | ||||
-rw-r--r-- | core/test-api/src/main/kotlin/testApi/logger/TestLogger.kt | 31 |
2 files changed, 2 insertions, 32 deletions
diff --git a/core/test-api/src/main/kotlin/testApi/context/MockContext.kt b/core/test-api/src/main/kotlin/testApi/context/MockContext.kt index 97347695..7b17a8ee 100644 --- a/core/test-api/src/main/kotlin/testApi/context/MockContext.kt +++ b/core/test-api/src/main/kotlin/testApi/context/MockContext.kt @@ -5,6 +5,7 @@ import org.jetbrains.dokka.plugability.DokkaContext import org.jetbrains.dokka.plugability.DokkaPlugin import org.jetbrains.dokka.plugability.ExtensionPoint import org.jetbrains.dokka.utilities.DokkaConsoleLogger +import org.jetbrains.dokka.utilities.LoggingLevel import kotlin.reflect.KClass import kotlin.reflect.KMutableProperty import kotlin.reflect.full.memberProperties @@ -31,7 +32,7 @@ class MockContext( override fun <T : Any, E : ExtensionPoint<T>> single(point: E): T = get(point).single() - override val logger = DokkaConsoleLogger + override val logger = DokkaConsoleLogger(LoggingLevel.DEBUG) override val configuration: DokkaConfiguration get() = testConfiguration ?: throw IllegalStateException("This mock context doesn't provide configuration") diff --git a/core/test-api/src/main/kotlin/testApi/logger/TestLogger.kt b/core/test-api/src/main/kotlin/testApi/logger/TestLogger.kt index 4f81f098..0bc66a2b 100644 --- a/core/test-api/src/main/kotlin/testApi/logger/TestLogger.kt +++ b/core/test-api/src/main/kotlin/testApi/logger/TestLogger.kt @@ -46,34 +46,3 @@ class TestLogger(private val logger: DokkaLogger) : DokkaLogger { logger.error(message) } } - -class FilteringLogger( - private val minLevel: Level, - private val downstream: DokkaLogger -) : DokkaLogger { - enum class Level { Debug, Info, Progress, Warn, Error } - - override var warningsCount: Int by downstream::warningsCount - - override var errorsCount by downstream::errorsCount - - override fun debug(message: String) { - if (minLevel <= Level.Debug) downstream.debug(message) - } - - override fun info(message: String) { - if (minLevel <= Level.Info) downstream.info(message) - } - - override fun progress(message: String) { - if (minLevel <= Level.Progress) downstream.progress(message) - } - - override fun warn(message: String) { - if (minLevel <= Level.Warn) downstream.warn(message) - } - - override fun error(message: String) { - if (minLevel <= Level.Error) downstream.error(message) - } -} |