HomeJavaModsAsync Logger
Async Logger
ModsJava

Async Logger

by decce · on CurseForge

Asynchronous logging and efficient filtering - performance improvements and utility for keeping your logs clean

Which build do you need?

This mod ships a separate file for every mod loader and every version of the game. Pick both, then download — the wrong build installs fine and then does nothing in the game.

Mod loader

Minecraft version

⬇ Download for 1.21.8–1.21.11 · Fabric⬇ Download for 1.18.2–1.21.4 · Fabric⬇ Download for 1.18.1 · Fabric⬇ Download for 1.21.8–1.21.11 · Quilt⬇ Download for 1.18.2–1.21.4 · Quilt⬇ Download for 1.18.1 · Quilt⬇ Download for 1.21.10–1.21.11 · NeoForge⬇ Download for 1.21–1.21.8 · NeoForge⬇ Download for 1.20.1 · Forge⬇ Download for 1.19.2 · Forge⬇ Download for 1.18.2 · Forge
I don't know my version or loader
Open the Minecraft launcher and look at the profile you play on — it names both, like fabric-loader-1.21.4. The version also shows in the bottom-right corner of the game's main menu.
No loader in the profile name? Then it's plain Minecraft, and these mods won't run — you need Fabric or NeoForge installed first.

Async Logger is a Minecraft mod that makes logging operations asynchronous.

In vanilla, loggers are not asynchronous. This means the actual logging operations, including I/O operations, happen on the logging thread. This mod changes logging to be asynchronous for better performance.

This can be especially useful when large amounts of messages are being logged and/or debug logging is enabled (default on Forge / NeoForge).

Benchmarks

Item Vanilla AsyncLogger
Simple Messages (10k) 6146.1ms 141.2ms
Messages with Placeholders (10k) 6413.2ms 96.6ms
Messages with Throwable (1.5k) 19572.4ms 9.0ms

You can do these tests yourself by enabling testPerformance in the config. When this option is enabled, the mod will log a large number of messages both before and after setting up async loggers. You can see the test results in the log.

Filtering

Starting from version 2.0.0, AsyncLogger supports log filtering. The filtering happens on the dedicated, async logger thread, ensuring there is no overhead for the caller.

To use, simply set filtering.enabled to true in the config, and edit one or more of the filters. Filtering by logger name, level, and message (match substring or regexps) is supported.

Technical Details

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more