diff options
author | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2023-02-20 21:34:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-20 21:34:12 +0100 |
commit | dbff38bacb25fc3021bbdd67ac25762bc0b0d30f (patch) | |
tree | bc26059428882dbee3f9bc95344fd9af887b3f1f /plugins/base | |
parent | 57622719edb912d7c3320f7e59cd6928e5c25e44 (diff) | |
download | dokka-dbff38bacb25fc3021bbdd67ac25762bc0b0d30f.tar.gz dokka-dbff38bacb25fc3021bbdd67ac25762bc0b0d30f.tar.bz2 dokka-dbff38bacb25fc3021bbdd67ac25762bc0b0d30f.zip |
Change default logging level of console apps (#2871)
Diffstat (limited to 'plugins/base')
5 files changed, 13 insertions, 8 deletions
diff --git a/plugins/base/base-test-utils/src/main/kotlin/renderers/TestPage.kt b/plugins/base/base-test-utils/src/main/kotlin/renderers/TestPage.kt index 4066c7c6..e25d8293 100644 --- a/plugins/base/base-test-utils/src/main/kotlin/renderers/TestPage.kt +++ b/plugins/base/base-test-utils/src/main/kotlin/renderers/TestPage.kt @@ -9,12 +9,13 @@ import org.jetbrains.dokka.model.doc.DocTag import org.jetbrains.dokka.model.properties.PropertyContainer import org.jetbrains.dokka.pages.* import org.jetbrains.dokka.utilities.DokkaConsoleLogger +import org.jetbrains.dokka.utilities.LoggingLevel fun testPage(callback: PageContentBuilder.DocumentableContentBuilder.() -> Unit): RawTestPage { val content = PageContentBuilder( EmptyCommentConverter, - KotlinSignatureProvider(EmptyCommentConverter, DokkaConsoleLogger()), - DokkaConsoleLogger() + KotlinSignatureProvider(EmptyCommentConverter, DokkaConsoleLogger(LoggingLevel.DEBUG)), + DokkaConsoleLogger(LoggingLevel.DEBUG) ).contentFor( DRI.topLevel, emptySet(), @@ -51,4 +52,4 @@ internal object EmptyCommentConverter : CommentsToContentConverter { styles: Set<Style>, extras: PropertyContainer<ContentNode> ): List<ContentNode> = emptyList() -}
\ No newline at end of file +} diff --git a/plugins/base/src/test/kotlin/basic/FailOnWarningTest.kt b/plugins/base/src/test/kotlin/basic/FailOnWarningTest.kt index 982d6550..682a257e 100644 --- a/plugins/base/src/test/kotlin/basic/FailOnWarningTest.kt +++ b/plugins/base/src/test/kotlin/basic/FailOnWarningTest.kt @@ -5,6 +5,7 @@ import org.jetbrains.dokka.testApi.logger.TestLogger import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest import org.jetbrains.dokka.utilities.DokkaConsoleLogger import org.jetbrains.dokka.utilities.DokkaLogger +import org.jetbrains.dokka.utilities.LoggingLevel import org.junit.jupiter.api.Test import org.junit.jupiter.api.assertThrows @@ -116,7 +117,7 @@ class FailOnWarningTest : BaseAbstractTest() { } private class ZeroErrorOrWarningCountDokkaLogger( - logger: DokkaLogger = DokkaConsoleLogger() + logger: DokkaLogger = DokkaConsoleLogger(LoggingLevel.DEBUG) ) : DokkaLogger by logger { override var warningsCount: Int = 0 override var errorsCount: Int = 0 diff --git a/plugins/base/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest1.kt b/plugins/base/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest1.kt index 4d296d17..8ed34b2a 100644 --- a/plugins/base/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest1.kt +++ b/plugins/base/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest1.kt @@ -7,6 +7,7 @@ import org.jetbrains.dokka.model.doc.DocumentationNode import org.jetbrains.dokka.plugability.DokkaContext import org.jetbrains.dokka.testApi.logger.TestLogger import org.jetbrains.dokka.utilities.DokkaConsoleLogger +import org.jetbrains.dokka.utilities.LoggingLevel import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test @@ -75,7 +76,7 @@ class ContextModuleAndPackageDocumentationReaderTest1 : AbstractContextModuleAnd private val context by lazy { DokkaContext.create( configuration = configurationBuilder.build(), - logger = TestLogger(DokkaConsoleLogger()), + logger = TestLogger(DokkaConsoleLogger(LoggingLevel.DEBUG)), pluginOverrides = emptyList() ) } diff --git a/plugins/base/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest3.kt b/plugins/base/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest3.kt index 6c9c351f..609f808d 100644 --- a/plugins/base/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest3.kt +++ b/plugins/base/src/test/kotlin/transformers/ContextModuleAndPackageDocumentationReaderTest3.kt @@ -4,6 +4,7 @@ import org.jetbrains.dokka.base.transformers.documentables.ModuleAndPackageDocum import org.jetbrains.dokka.links.DRI import org.jetbrains.dokka.plugability.DokkaContext import org.jetbrains.dokka.utilities.DokkaConsoleLogger +import org.jetbrains.dokka.utilities.LoggingLevel import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import testApi.testRunner.TestDokkaConfigurationBuilder @@ -36,7 +37,7 @@ class ContextModuleAndPackageDocumentationReaderTest3 : AbstractContextModuleAnd private val context by lazy { DokkaContext.create( configuration = configurationBuilder.build(), - logger = DokkaConsoleLogger(), + logger = DokkaConsoleLogger(LoggingLevel.DEBUG), pluginOverrides = emptyList() ) } diff --git a/plugins/base/src/test/kotlin/transformers/InvalidContentModuleAndPackageDocumentationReaderTest.kt b/plugins/base/src/test/kotlin/transformers/InvalidContentModuleAndPackageDocumentationReaderTest.kt index 3c2151d8..aa0b16ca 100644 --- a/plugins/base/src/test/kotlin/transformers/InvalidContentModuleAndPackageDocumentationReaderTest.kt +++ b/plugins/base/src/test/kotlin/transformers/InvalidContentModuleAndPackageDocumentationReaderTest.kt @@ -3,6 +3,7 @@ package transformers import org.jetbrains.dokka.base.transformers.documentables.ModuleAndPackageDocumentationReader import org.jetbrains.dokka.plugability.DokkaContext import org.jetbrains.dokka.utilities.DokkaConsoleLogger +import org.jetbrains.dokka.utilities.LoggingLevel import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import testApi.testRunner.TestDokkaConfigurationBuilder @@ -52,14 +53,14 @@ class InvalidContentModuleAndPackageDocumentationReaderTest : AbstractContextMod private val contextA by lazy { DokkaContext.create( configuration = configurationBuilderA.build(), - logger = DokkaConsoleLogger(), + logger = DokkaConsoleLogger(LoggingLevel.DEBUG), pluginOverrides = emptyList() ) } private val contextB by lazy { DokkaContext.create( configuration = configurationBuilderB.build(), - logger = DokkaConsoleLogger(), + logger = DokkaConsoleLogger(LoggingLevel.DEBUG), pluginOverrides = emptyList() ) } |