diff options
author | Linnea Gräf <nea@nea.moe> | 2025-04-01 13:40:31 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2025-04-01 13:40:31 +0200 |
commit | 65038b7b370e5e8bc3e4e4d697a42b04a9c825e6 (patch) | |
tree | 87df7eabc820a22bcddd099130d73b664f43b68c /src/main/kotlin/features/debug/DebugLogger.kt | |
parent | 735b3b704f971521256f0b4e67e5e5bfb309e0f5 (diff) | |
download | Firmament-65038b7b370e5e8bc3e4e4d697a42b04a9c825e6.tar.gz Firmament-65038b7b370e5e8bc3e4e4d697a42b04a9c825e6.tar.bz2 Firmament-65038b7b370e5e8bc3e4e4d697a42b04a9c825e6.zip |
Diffstat (limited to 'src/main/kotlin/features/debug/DebugLogger.kt')
-rw-r--r-- | src/main/kotlin/features/debug/DebugLogger.kt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/kotlin/features/debug/DebugLogger.kt b/src/main/kotlin/features/debug/DebugLogger.kt index 2c6b962..9115956 100644 --- a/src/main/kotlin/features/debug/DebugLogger.kt +++ b/src/main/kotlin/features/debug/DebugLogger.kt @@ -10,6 +10,7 @@ class DebugLogger(val tag: String) { companion object { val allInstances = InstanceList<DebugLogger>("DebugLogger") } + object EnabledLogs : DataHolder<MutableSet<String>>(serializer(), "DebugLogs", ::mutableSetOf) init { @@ -17,6 +18,7 @@ class DebugLogger(val tag: String) { } fun isEnabled() = DeveloperFeatures.isEnabled && EnabledLogs.data.contains(tag) + fun log(text: String) = log { text } fun log(text: () -> String) { if (!isEnabled()) return MC.sendChat(Text.literal(text())) |