NoConsoleSpam
一款 Minecraft Fabric 模组,通过过滤不必要的消息和警告来减少控制台刷屏。
功能特性
- 过滤常见的刷屏模式,包括:
- Lithium 相关消息
- 方块不匹配错误
- 服务器过载消息
- 玩家移动警告
- Class Analysis 错误
- 支持通过配置文件自定义模式
- 外部 JSON 配置文件,便于自定义
- 增强的异常日志记录系统:
- 按来源(模组/插件/类)组织异常
- 捕获所有类型的 Java 异常(运行时、IO、反射、安全、网络等)
- 使用详细上下文记录 JVM 错误
- 包含原因、线程、日志记录器和上下文的详细异常信息
- 带有完整堆栈跟踪的独立错误日志
- 自动将异常分类到逻辑组中
- 健壮的错误处理与优雅恢复机制
- 空值安全的实现,保障服务器稳定性
- 轻量且高效
- 兼容 Minecraft 主要版本更新和快照版
安装方法
- 为 Minecraft 安装 Fabric Loader
- 下载对应你 Minecraft 版本的正确文件
- 将模组 JAR 文件放入 Minecraft 的 mods 文件夹
- 使用 Fabric Loader 启动 Minecraft
配置
该模组现在使用位于 config/NoConsoleSpam/spamfilters.json 的外部配置文件。首次运行模组时会自动创建此文件。
你可以自定义以下设置:
- 刷屏模式(使用正则表达式)
- 忽略的日志记录器(完全静默特定的日志记录器)
- 异常日志记录设置
示例配置:
{
"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
}
}
异常日志记录
异常现在被单独记录到 Console Errors 目录中的独立文件中。默认情况下,异常会根据其来源(模组/插件/类)组织到子目录中,从而更容易追踪来自特定组件的问题。
每个异常日志文件包含:
- 时间戳和异常类型
- 来源标识(哪个模组/插件/类导致的)
- 异常类别(Runtime、IO、Reflection 等)
- 线程名称、日志记录器名称和日志级别
- 完整的异常消息和堆栈跟踪
- 可用时的原因信息
- 任何被抑制的异常
这种增强的日志记录系统为调试 Minecraft 和 Fabric 模组中的问题提供了更多的上下文信息。
异常日志记录设置
新的异常日志记录系统提供了多种选项来控制记录内容:
organizeBySource: 启用后,异常会按其来源组织到子目录中captureRuntimeExceptions: 控制是否记录 RuntimeException(如 NullPointerException 等)captureIOExceptions: 控制是否记录 IOException(文件错误)captureFabricExceptions: 控制是否记录 Fabric 特定异常captureMinecraftExceptions: 控制是否记录 Minecraft 特定异常captureReflectionExceptions: 控制是否记录与反射相关的异常captureSecurityExceptions: 控制是否记录与安全相关的异常captureNetworkExceptions: 控制是否记录与网络相关的异常captureDataExceptions: 控制是否记录与数据相关的异常captureErrors: 控制是否记录 JVM 错误captureConcurrentExceptions: 控制是否记录与并发相关的异常
更新日志
有关每个版本的更详细信息,请参阅 CHANGES.md 文件。
许可证
本项目采用 MIT 许可证授权 - 详情请参阅 LICENSE 文件。
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
- Install Fabric Loader for Minecraft
- Download the correct version for your Minecraft version
- Place the mod JAR file in your Minecraft mods folder
- 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 sourcecaptureRuntimeExceptions: Controls whether to log RuntimeExceptions (NullPointerException, etc.)captureIOExceptions: Controls whether to log IOExceptions (file errors)captureFabricExceptions: Controls whether to log Fabric-specific exceptionscaptureMinecraftExceptions: Controls whether to log Minecraft-specific exceptionscaptureReflectionExceptions: Controls whether to log reflection-related exceptionscaptureSecurityExceptions: Controls whether to log security-related exceptionscaptureNetworkExceptions: Controls whether to log network-related exceptionscaptureDataExceptions: Controls whether to log data-related exceptionscaptureErrors: Controls whether to log JVM errorscaptureConcurrentExceptions: 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
下载 NoConsoleSpam
下载 NoConsoleSpam
下载 NoConsoleSpam
下载 NoConsoleSpam
下载 NoConsoleSpam
下载 NoConsoleSpam
下载 NoConsoleSpam
下载 NoConsoleSpam
下载 NoConsoleSpam
暂无更新日志
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
缓冲的原始输入和线程化的事件轮询
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
原版世界生成优化模组
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
评论 0
登录后参与评分
还没有评论,来抢沙发吧