Skip to main content

LogFilter

LogFilter is a highly configurable log filtering mod for Minecraft that gives you complete control over which log messages appear in your console and log files. Define rules to suppress noisy output, filter by log level, match logger names or message content with regex — all from a single JSON config file that hot-reloads without restarting the game.

Key Features

FeatureDescription
Message Regex FilteringMatch and filter log messages using Java regex patterns
Logger Name FilteringSuppress output from specific loggers or entire logger hierarchies
Log Level FilteringFilter messages by level (DEBUG, INFO, WARN, ERROR)
Multiple ActionsDeny, allow, or remain neutral on matched messages
Hot-ReloadConfig changes are detected and applied automatically — no restart required
Per-Rule ControlEnable or disable individual rules without removing them

Supported Platforms

LoaderMinecraft VersionStatus
Forge1.20.1Supported
Fabric1.20.1Supported
Fabric1.21.1Supported
NeoForge1.21.1Supported

How It Works

LogFilter attaches a configurable filter to the Log4j2 root logger during mod initialization. Every log message passes through this filter before being displayed or written to file. The filter evaluates your rules in order — the first matching rule determines whether the message is denied, allowed, or passed through unchanged.

The mod monitors its config file for changes using a background watcher thread. When you edit and save logfilter.json, the new rules are loaded and applied within about half a second — no game restart needed.

tip

LogFilter never filters its own messages. You will always see [LogFilter] initialization and reload messages in the log regardless of your rules.


Next Steps