Skip to content

Commit

Permalink
Need at least INFO for Quarkus logs (to get the listen URL)
Browse files Browse the repository at this point in the history
  • Loading branch information
snazy committed May 2, 2023
1 parent 569de8d commit 310b13c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/Testing.kt
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ class NessieTestingPlugin : Plugin<Project> {
jvmArgumentProviders.add(
CommandLineArgumentProvider {
listOf(
"-Dquarkus.log.level=${testLogLevel()}",
"-Dquarkus.log.console.level=${testLogLevel()}",
"-Dquarkus.log.level=${testLogLevel("INFO")}",
"-Dquarkus.log.console.level=${testLogLevel("INFO")}",
"-Dhttp.access.log.level=${testLogLevel()}"
)
}
Expand Down
10 changes: 10 additions & 0 deletions buildSrc/src/main/kotlin/Utilities.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import org.gradle.api.artifacts.ModuleDependency
import org.gradle.api.artifacts.VersionCatalogsExtension
import org.gradle.api.file.FileTree
import org.gradle.api.file.RegularFileProperty
import org.gradle.api.logging.LogLevel
import org.gradle.api.plugins.JavaPluginExtension
import org.gradle.api.tasks.InputFile
import org.gradle.api.tasks.OutputFile
Expand Down Expand Up @@ -115,6 +116,15 @@ fun Project.libsRequiredVersion(name: String): String {

fun testLogLevel(): String = System.getProperty("test.log.level", "WARN")

fun testLogLevel(minVerbose: String): String {
val requested = LogLevel.valueOf(testLogLevel().uppercase())
val minimum = LogLevel.valueOf(minVerbose.uppercase())
if (requested.ordinal > minimum.ordinal) {
return minimum.name
}
return requested.name
}

/** Check whether the current build is run in the context of integrations-testing. */
fun isIntegrationsTestingEnabled() =
System.getProperty("nessie.integrationsTesting.enable").toBoolean()
Expand Down

0 comments on commit 310b13c

Please sign in to comment.