diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-09-14 19:46:52 +0200 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-09-14 19:46:52 +0200 |
| commit | 0a96dd618acba15269627c7eae8a2291fb2dc84a (patch) | |
| tree | f31a66cbd13cefbfb2d006f07d3ef3da1010f7e7 /src/main/kotlin/features/debug/DebugLogger.kt | |
| parent | 9abe9f46f04f188037687adb2740b32220ad21b2 (diff) | |
| download | Firmament-0a96dd618acba15269627c7eae8a2291fb2dc84a.tar.gz Firmament-0a96dd618acba15269627c7eae8a2291fb2dc84a.tar.bz2 Firmament-0a96dd618acba15269627c7eae8a2291fb2dc84a.zip | |
snapshot
Diffstat (limited to 'src/main/kotlin/features/debug/DebugLogger.kt')
| -rw-r--r-- | src/main/kotlin/features/debug/DebugLogger.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/kotlin/features/debug/DebugLogger.kt b/src/main/kotlin/features/debug/DebugLogger.kt index 9115956..02073b7 100644 --- a/src/main/kotlin/features/debug/DebugLogger.kt +++ b/src/main/kotlin/features/debug/DebugLogger.kt @@ -4,6 +4,7 @@ import kotlinx.serialization.serializer import net.minecraft.text.Text import moe.nea.firmament.util.MC import moe.nea.firmament.util.collections.InstanceList +import moe.nea.firmament.util.data.Config import moe.nea.firmament.util.data.DataHolder class DebugLogger(val tag: String) { @@ -11,13 +12,14 @@ class DebugLogger(val tag: String) { val allInstances = InstanceList<DebugLogger>("DebugLogger") } + @Config object EnabledLogs : DataHolder<MutableSet<String>>(serializer(), "DebugLogs", ::mutableSetOf) init { allInstances.add(this) } - fun isEnabled() = DeveloperFeatures.isEnabled && EnabledLogs.data.contains(tag) + fun isEnabled() = EnabledLogs.data.contains(tag) fun log(text: String) = log { text } fun log(text: () -> String) { if (!isEnabled()) return |
