diff options
author | Linnea Gräf <nea@nea.moe> | 2024-04-19 20:57:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-19 20:57:07 +0200 |
commit | 40309bc8acb7afb37bbc99d7a758c24ffd962b4c (patch) | |
tree | cfabc8d261d820ea63921bead05e20feb67f4a4f /src/main/java/at/hannibal2/skyhanni/utils | |
parent | f3b6288fed75eacede95627282cb9bfec73f0c9e (diff) | |
download | skyhanni-40309bc8acb7afb37bbc99d7a758c24ffd962b4c.tar.gz skyhanni-40309bc8acb7afb37bbc99d7a758c24ffd962b4c.tar.bz2 skyhanni-40309bc8acb7afb37bbc99d7a758c24ffd962b4c.zip |
Backend: Add unimined build system (#1456)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/MinecraftConsoleFilter.kt | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/MinecraftConsoleFilter.kt b/src/main/java/at/hannibal2/skyhanni/utils/MinecraftConsoleFilter.kt index 4022b382c..5de464872 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/MinecraftConsoleFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/MinecraftConsoleFilter.kt @@ -11,9 +11,10 @@ import org.apache.logging.log4j.core.Filter import org.apache.logging.log4j.core.LogEvent import org.apache.logging.log4j.core.Logger import org.apache.logging.log4j.core.LoggerContext +import org.apache.logging.log4j.core.filter.AbstractFilter import org.apache.logging.log4j.message.Message -class MinecraftConsoleFilter(private val loggerConfigName: String) : Filter { +class MinecraftConsoleFilter(private val loggerConfigName: String) : AbstractFilter(Filter.Result.ACCEPT, Filter.Result.DENY) { private val config get() = SkyHanniMod.feature.dev.minecraftConsoles private val filterConfig get() = config.consoleFilter @@ -35,8 +36,6 @@ class MinecraftConsoleFilter(private val loggerConfigName: String) : Filter { } } - // prevents error sending on every shutdown - fun stop() {} override fun filter(event: LogEvent?): Filter.Result { if (event == null) return Filter.Result.ACCEPT @@ -205,14 +204,6 @@ class MinecraftConsoleFilter(private val loggerConfigName: String) : Filter { } } - override fun getOnMismatch(): Filter.Result { - return Filter.Result.DENY - } - - override fun getOnMatch(): Filter.Result { - return Filter.Result.ACCEPT - } - override fun filter( logger: Logger?, level: Level?, |