aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features/debug
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-10-13 18:32:17 +0200
committerLinnea Gräf <nea@nea.moe>2025-10-13 18:32:17 +0200
commit8d14ea329584924c51c5dc80720ddb829a289396 (patch)
tree9b442d3944abfec27e3ca0018e9dc3328b8111a4 /src/main/kotlin/features/debug
parent72347d1e5b10061a30b177de4574c1044a7f7c4c (diff)
downloadFirmament-8d14ea329584924c51c5dc80720ddb829a289396.tar.gz
Firmament-8d14ea329584924c51c5dc80720ddb829a289396.tar.bz2
Firmament-8d14ea329584924c51c5dc80720ddb829a289396.zip
test: fix debuglogger usage in tests
Diffstat (limited to 'src/main/kotlin/features/debug')
-rw-r--r--src/main/kotlin/features/debug/DebugLogger.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/kotlin/features/debug/DebugLogger.kt b/src/main/kotlin/features/debug/DebugLogger.kt
index 02073b7..52f6143 100644
--- a/src/main/kotlin/features/debug/DebugLogger.kt
+++ b/src/main/kotlin/features/debug/DebugLogger.kt
@@ -3,6 +3,7 @@ package moe.nea.firmament.features.debug
import kotlinx.serialization.serializer
import net.minecraft.text.Text
import moe.nea.firmament.util.MC
+import moe.nea.firmament.util.TestUtil
import moe.nea.firmament.util.collections.InstanceList
import moe.nea.firmament.util.data.Config
import moe.nea.firmament.util.data.DataHolder
@@ -19,7 +20,7 @@ class DebugLogger(val tag: String) {
allInstances.add(this)
}
- fun isEnabled() = EnabledLogs.data.contains(tag)
+ fun isEnabled() = TestUtil.isInTest || EnabledLogs.data.contains(tag)
fun log(text: String) = log { text }
fun log(text: () -> String) {
if (!isEnabled()) return