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 | |
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')
7 files changed, 17 insertions, 10 deletions
diff --git a/plugins/all-modules-page/src/test/kotlin/MultiModuleDokkaTestGenerator.kt b/plugins/all-modules-page/src/test/kotlin/MultiModuleDokkaTestGenerator.kt index adb61e7e..0958a35e 100644 --- a/plugins/all-modules-page/src/test/kotlin/MultiModuleDokkaTestGenerator.kt +++ b/plugins/all-modules-page/src/test/kotlin/MultiModuleDokkaTestGenerator.kt @@ -13,6 +13,7 @@ import org.jetbrains.dokka.testApi.testRunner.TestBuilder import org.jetbrains.dokka.testApi.testRunner.TestMethods import org.jetbrains.dokka.utilities.DokkaConsoleLogger import org.jetbrains.dokka.utilities.DokkaLogger +import org.jetbrains.dokka.utilities.LoggingLevel class MultiModuleDokkaTestGenerator( configuration: DokkaConfiguration, @@ -85,7 +86,7 @@ class MultiModuleTestBuilder : TestBuilder<MultiModuleTestMethods>() { ) } -abstract class MultiModuleAbstractTest(logger: TestLogger = TestLogger(DokkaConsoleLogger())) : +abstract class MultiModuleAbstractTest(logger: TestLogger = TestLogger(DokkaConsoleLogger(LoggingLevel.DEBUG))) : AbstractTest<MultiModuleTestMethods, MultiModuleTestBuilder, MultiModuleDokkaTestGenerator>( ::MultiModuleTestBuilder, ::MultiModuleDokkaTestGenerator, 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() ) } diff --git a/plugins/templating/src/test/kotlin/org/jetbrains/dokka/templates/TemplatingDokkaTestGenerator.kt b/plugins/templating/src/test/kotlin/org/jetbrains/dokka/templates/TemplatingDokkaTestGenerator.kt index 50a68efb..c22a5e44 100644 --- a/plugins/templating/src/test/kotlin/org/jetbrains/dokka/templates/TemplatingDokkaTestGenerator.kt +++ b/plugins/templating/src/test/kotlin/org/jetbrains/dokka/templates/TemplatingDokkaTestGenerator.kt @@ -12,6 +12,7 @@ import org.jetbrains.dokka.testApi.testRunner.TestBuilder import org.jetbrains.dokka.testApi.testRunner.TestMethods import org.jetbrains.dokka.utilities.DokkaConsoleLogger import org.jetbrains.dokka.utilities.DokkaLogger +import org.jetbrains.dokka.utilities.LoggingLevel class TemplatingDokkaTestGenerator( configuration: DokkaConfiguration, @@ -61,7 +62,7 @@ class TemplatingTestBuilder : TestBuilder<TemplatingTestMethods>() { ) } -abstract class TemplatingAbstractTest(logger: TestLogger = TestLogger(DokkaConsoleLogger())) : +abstract class TemplatingAbstractTest(logger: TestLogger = TestLogger(DokkaConsoleLogger(LoggingLevel.DEBUG))) : AbstractTest<TemplatingTestMethods, TemplatingTestBuilder, TemplatingDokkaTestGenerator>( ::TemplatingTestBuilder, ::TemplatingDokkaTestGenerator, |