跳到正文

NoConsoleSpam

作者:MichaJDev

Pesky Console Spam, no more!

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

NoConsoleSpam

A Minecraft Fabric mod that reduces console spam by filtering out unnecessary messages and warnings.

Features

  • Filters out common spam patterns including:
  • Lithium-related messages
  • Mismatch block errors
  • Server overloading messages
  • Player movement warnings
  • Class Analysis Errors
  • Support for custom patterns via configuration
  • External JSON configuration file for easy customization
  • Enhanced exception logging system:
  • Organizes exceptions by source (mod/plugin/class)
  • Captures all types of Java exceptions (Runtime, IO, Reflection, Security, Network, etc.)
  • Logs JVM errors with detailed context
  • Detailed exception information including cause, thread, logger, and context
  • Individual error logs with full stack traces
  • Automatic categorization of exceptions into logical groups
  • Robust error handling with graceful recovery mechanisms
  • Null-safe implementation for server stability
  • Lightweight and efficient
  • Compatible with Minecraft Major Updates and Snapshots

Installation

  1. Install Fabric Loader for Minecraft
  2. Download the correct version for your Minecraft version
  3. Place the mod JAR file in your Minecraft mods folder
  4. Launch Minecraft with Fabric Loader

Configuration

The mod now uses an external configuration file located at config/NoConsoleSpam/spamfilters.json. This file is automatically created when the mod is first run.

You can customize the following settings:

  • Spam patterns (using regular expressions)
  • Ignored loggers (to completely silence specific loggers)
  • Exception logging settings

Example configuration:

{
  "spamPatterns": [
    ".*Lithium.*",
    ".*mismatch.*",
    ".*overloading.*",
    ".*moving.*wrongly.*",
    ".*Class Analysis Error.*"
  ],
  "ignoredLoggers": [
    "net.minecraft.class_5458",
    "net.minecraft.class_5459",
    "net.minecraft.class_5460"
  ],
  "exceptionSettings": {
    "captureExceptions": true,
    "logFile": "logs/exceptions.log",
    "maxLogSize": 10485760,
    "maxBackupIndex": 3,
    "organizeBySource": true,
    "captureRuntimeExceptions": true,
    "captureIOExceptions": true,
    "captureFabricExceptions": true,
    "captureMinecraftExceptions": true,
    "captureReflectionExceptions": true,
    "captureSecurityExceptions": true,
    "captureNetworkExceptions": true,
    "captureDataExceptions": true,
    "captureErrors": true,
    "captureConcurrentExceptions": true
  }
}

Exception Logging

Exceptions are now logged individually to separate files in the Console Errors directory. By default, the exceptions are organized into subdirectories based on their source (mod/plugin/class), making it much easier to track down issues from specific components.

Each exception log file contains:

  • Timestamp and exception type
  • Source identification (what mod/plugin/class caused it)
  • Exception category (Runtime, IO, Reflection, etc.)
  • Thread name, logger name, and log level
  • Full exception message and stack trace
  • Cause information, when available
  • Any suppressed exceptions

This enhanced logging system provides much more context for debugging issues in Minecraft and Fabric mods.

Exception Logging Settings

The new exception logging system provides several options to control what gets logged:

  • organizeBySource: When enabled, exceptions are organized into subdirectories by their source
  • captureRuntimeExceptions: Controls whether to log RuntimeExceptions (NullPointerException, etc.)
  • captureIOExceptions: Controls whether to log IOExceptions (file errors)
  • captureFabricExceptions: Controls whether to log Fabric-specific exceptions
  • captureMinecraftExceptions: Controls whether to log Minecraft-specific exceptions
  • captureReflectionExceptions: Controls whether to log reflection-related exceptions
  • captureSecurityExceptions: Controls whether to log security-related exceptions
  • captureNetworkExceptions: Controls whether to log network-related exceptions
  • captureDataExceptions: Controls whether to log data-related exceptions
  • captureErrors: Controls whether to log JVM errors
  • captureConcurrentExceptions: Controls whether to log concurrent-related exceptions

Changelog

For more detailed information about each release, see the CHANGES.md file.

License

This project is licensed under the MIT License – see the LICENSE file for details.

常见问题

NoConsoleSpam 支持哪些 Minecraft 版本?

NoConsoleSpam 支持 Minecraft Java 版 1.20.1–1.21.10,共 8 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。

NoConsoleSpam 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。

评论

登录后评论和评分