Skip to content

Commit

Permalink
Do it for the netty logger specifically
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt committed Dec 29, 2023
1 parent bff40a2 commit f1bf551
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions loader/src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
<MarkerFilter marker="FORGEMOD" onMatch="${sys:forge.logging.marker.forgemod:-ACCEPT}" onMismatch="NEUTRAL"/>
<MarkerFilter marker="LOADING" onMatch="${sys:forge.logging.marker.loading:-ACCEPT}" onMismatch="NEUTRAL"/>
<MarkerFilter marker="CORE" onMatch="${sys:forge.logging.marker.core:-ACCEPT}" onMismatch="NEUTRAL"/>

<!-- Netty reflects into JDK internals, and it's causing useless DEBUG-level error stacktraces. We just ignore them -->
<RegexFilter regex="^direct buffer constructor: unavailable$" onMatch="DENY" onMismatch="NEUTRAL" />
<RegexFilter regex="^jdk\.internal\.misc\.Unsafe\.allocateUninitializedArray\(int\): unavailable$" onMatch="DENY" onMismatch="NEUTRAL" />
</filters>
<Appenders>
<TerminalConsole name="Console">
Expand Down Expand Up @@ -63,6 +59,15 @@
<Logger level="${sys:forge.logging.mojang.level:-info}" name="com.mojang"/>
<Logger level="${sys:forge.logging.mojang.level:-info}" name="net.minecraft"/>
<Logger level="${sys:forge.logging.classtransformer.level:-info}" name="cpw.mods.modlauncher.ClassTransformer"/>

<!-- Netty reflects into JDK internals, and it's causing useless DEBUG-level error stacktraces. We just ignore them -->
<Logger name="io.netty.util.internal.PlatformDependent0">
<filters>
<RegexFilter regex="^direct buffer constructor: unavailable$" onMatch="DENY" onMismatch="NEUTRAL" />
<RegexFilter regex="^jdk\.internal\.misc\.Unsafe\.allocateUninitializedArray\(int\): unavailable$" onMatch="DENY" onMismatch="NEUTRAL" />
</filters>
</Logger>

<Root level="all">
<AppenderRef ref="Console" level="${sys:forge.logging.console.level:-info}"/>
<AppenderRef ref="ServerGuiConsole" level="${sys:forge.logging.console.level:-info}"/>
Expand Down

0 comments on commit f1bf551

Please sign in to comment.