Gate empty-packet log under debug, add packet exclusion list

- Change empty packet log from log.Warn to log.Debug so it only
  shows when DebugMessages is enabled
- Add PacketDebugExclusions config (List<string>) to suppress
  specific packet types like KeepAlive, Ping from packet debug output
- Check exclusion in both LogIncomingPacket and LogOutgoingPacket
- Add ConfigComments resource entry for the new setting
This commit is contained in:
Anon 2026-06-11 22:03:36 +02:00
parent 28e845d1ca
commit 98dfde6cc2
4 changed files with 30 additions and 2 deletions

View file

@ -1541,6 +1541,15 @@ namespace MinecraftClient {
}
}
/// <summary>
/// Looks up a localized string similar to Packet types to exclude from packet debug logs, e.g. [&quot;KeepAlive&quot;, &quot;Ping&quot;]..
/// </summary>
internal static string Logging_PacketDebugExclusions {
get {
return ResourceManager.GetString("Logging.PacketDebugExclusions", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Show error messages..
/// </summary>

View file

@ -629,6 +629,9 @@ Want to upgrade to a newer version? See https://github.com/MCCTeam/Minecraft-Con
<data name="Logging.PacketDebugMessages" xml:space="preserve">
<value>Show low-level packet debug logs.</value>
</data>
<data name="Logging.PacketDebugExclusions" xml:space="preserve">
<value>Packet types to exclude from packet debug logs, e.g. ["KeepAlive", "Ping"].</value>
</data>
<data name="Logging.ErrorMessages" xml:space="preserve">
<value>Show error messages.</value>
</data>