Skip to content

Commit

Permalink
Remove annoying logging caused by Netty (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt authored Dec 29, 2023
1 parent 29b9b43 commit 3ce905f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions loader/src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,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 3ce905f

Please sign in to comment.