experiment: Increase logging based on PR label

This commit is contained in:
Magnus Leßmann (@MarkL4YG) 2024-11-23 21:03:12 +01:00
parent fc4ea17cf3
commit 335eb3ed8d
3 changed files with 36 additions and 17 deletions

View file

@ -7,6 +7,7 @@ plugins {
group = "io.github.markl4yg.hca"
version = "0.0.1-SNAPSHOT"
val springDebugLogging = providers.gradleProperty("SPRING_DEBUG").orNull == "true"
apply(
from = file("./gradle/spotless.gradle")
@ -57,6 +58,13 @@ dependencies {
tasks.withType<Test> {
useJUnitPlatform()
if (springDebugLogging) {
// Additional Hibernate logging
jvmArgs("-Dlogging.level.org.sqlite=DEBUG")
jvmArgs("-Dlogging.level.org.hibernate=DEBUG")
jvmArgs("-Dhibernate.show_sql=true")
jvmArgs("-Dhibernate.format_sql=true")
}
systemProperty("spring.profiles.active", "test")
jvmArgs("-XX:+EnableDynamicAgentLoading") // DynamicAgentLoading for byteBuddy within Mockito